0
我試圖預編譯供應商資產文件夾中的文件。Rails預編譯供應商/資產
在Rails控制檯生產我得到這個:
puts Rails.application.config.assets.precompile
#<Proc:[email protected]/home/pills/.rvm/gems/ruby-2.1.0/gems/sprockets-rails-2.1.3/lib/sprockets/railtie.rb:40 (lambda)>
(?-mix:(?:\/|\\|\A)application\.(css|js)$)
(?-mix:.*.png)
puts Rails.application.config.assets.paths
/media/pills/be3eb155-9e10-4a71-9737-c82606a3dbd4/home/ububtu/code/ccr/app/assets/fonts
/media/pills/be3eb155-9e10-4a71-9737-c82606a3dbd4/home/ububtu/code/ccr/app/assets/images
/media/pills/be3eb155-9e10-4a71-9737-c82606a3dbd4/home/ububtu/code/ccr/app/assets/javascripts
/media/pills/be3eb155-9e10-4a71-9737-c82606a3dbd4/home/ububtu/code/ccr/app/assets/stylesheets
/media/pills/be3eb155-9e10-4a71-9737-c82606a3dbd4/home/ububtu/code/ccr/vendor/assets/chosen
/media/pills/be3eb155-9e10-4a71-9737-c82606a3dbd4/home/ububtu/code/ccr/vendor/assets/javascripts
/media/pills/be3eb155-9e10-4a71-9737-c82606a3dbd4/home/ububtu/code/ccr/vendor/assets/stylesheets
/home/pills/.rvm/gems/ruby-2.1.0/gems/turbolinks-2.2.2/lib/assets/javascripts
/home/pills/.rvm/gems/ruby-2.1.0/gems/jquery-rails-3.1.0/vendor/assets/javascripts
/home/pills/.rvm/gems/ruby-2.1.0/gems/coffee-rails-4.0.1/lib/assets/javascripts
在預編譯的最後一部分是在生產中通過了:
config.assets.precompile += [/.*.png/]
爲什麼選擇文件夾中的PNG文件不被預編譯?
如果我將png複製到app/assets/images,它可以工作,我現在就可以解決這個問題。
不適合我,不知道發生了什麼事 – juanpastas 2014-09-15 19:04:19