asset-pipeline

    0熱度

    1回答

    因此,本質上,我是在Rails 3.2.22上,然後升級到4.0,然後升級到4.1,最後升級到4.2。 當我加載任何頁面時,瀏覽器控制檯顯示「something.self.js」未找到(404)。現在的確如此,因爲該文件名不包含.self擴展名。 解決方案是什麼?類似的問題在這裏問How to disable adding ".self." in Sprockets 3.0,給出的答案是關閉調試c

    0熱度

    1回答

    我是新來Rails.When我部署應用的Heroku,終端表現出這樣的信息: remote: -----> Detecting rake tasks remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: I, [2017-05-10T05:

    0熱度

    1回答

    我運行了rake assets:precompile並生成了資產,但在嘗試加載它時收到404錯誤。我在啓動服務器之前設置了RAILS_ENV=production。 樓[2017-05-15T04:15:17.160326#48336] FATAL - :[05dd2f39-ef90-4e83-8c9f-ebf8b95f04c8]的ActionController :: RoutingError(

    0熱度

    1回答

    目標 - 我正在使用grunt設置資產管道來轉換和壓縮網站的圖像文件。 問題 - grunt-responsive-images無法找到gm/convert。 Warning: Could not execute GraphicsMagick/ImageMagick: identify "-ping" "-format" "%m:%T:%s" "src/css/images/test.jpg" t

    5熱度

    3回答

    在Rails 5.1中,如果我們使用asset_path作爲公用文件夾中的文件,則存在棄用警告。 DEPRECATION WARNING: The asset "favicon.ico" is not present in the asset pipeline.Falling back to an asset that may be in the public folder. This behav

    0熱度

    1回答

    我正在爲我的rails項目使用active_admin。 ActiveAdmin取決於bourbon寶石。當我運行rake assets:precompile時,出現以下錯誤。 rake aborted! Sass::SyntaxError: Undefined variable: "$output-bourbon-deprecation-warnings". /home/selvamani/

    0熱度

    1回答

    我的圖像位於/app/assets/images/myfolder/a.png。我想在api中返回圖片網址。那麼,如何在控制器中獲得這個路徑? 我已經嘗試過以下 ActionController::Base.helpers.image_path('myfolder/a.png') ActionController::Base.helpers.asset_path('myfolder/a.png'

    0熱度

    1回答

    如何在Ruby on Rails項目中包含多個Javascript和CSS文件? 文件不在assets/javascript和assets/stylesheets中,而是在/css和/js的目錄中。這些目錄中還有大量的子文件夾。 我試着更新manifest.js文件,並嘗試在application.html.erb中包含幾個樣式錶鏈接,但是我的文件沒有被包含在我的項目中。 我寧願將清單文件指向我需

    1熱度

    2回答

    在我的ruby on rails應用程序中,我控制了一個名爲AnimalsController的控件。在這個控制器中,我在我的動物文件夾中有一個「編輯」和相應的edit.html.erb視圖。當我還手動添加一些靜態javascript文件到位於public/assets/js /文件夾的頁面。當我渲染視圖時,而不是rails會試圖在相對路徑而不是mydomail.com/assets/js/文件夾

    0熱度

    2回答

    我想在使用grails模板的javascript中的特定條件下顯示模式。但是我的更改不可見。這裏是java腳本代碼: if(!isSame){ alert("Hiii"); $('#edit-state-modal2').modal('show') } 警報來了,但模態沒有打開。普惠制代碼如下: <g:render template="/inclu