如何使Apache +乘客和導軌資產管道一起工作很好?資產管道導軌3.2不能在生產中工作
當我部署我在本地工作的項目,我得到一個500錯誤
In ActionView::Template::Error occurred in pages#start: jquery-ui-1.8.21.custom.min isn't precompiled
如果我用grep my_project/current/assets_manifest.yml
爲jquery-ui-1.8
,它給了我
jquery-ui-1.8.21.custom.min.js: jquery-ui-1.8.21.custom.minc50ea0bef9c2fae04ab3b50ead60fc1f.js
且該文件也存在於my_project/shared/assets
(沿與jquery-ui-1.8.21.custom.min-c50ea0bef9c2fae04ab3b50ead60fc1f.js.gz,jquery-ui-1.8.21.custom.min.js,jquery-ui-1.8.21.custom.min.js.gz)。
當我在瀏覽器中打開 http://mytestserver/assets/jquery-ui-1.8.21.custom.min-c50ea0bef9c2fae04ab3b50ead60fc1f.js
它給了我正確的js文件。
500錯誤是由
app/views/layouts/application.haml:25
行提出該文件的24-26是:
= javascript_include_tag "application"
= javascript_include_tag "jquery-ui-1.8.21.custom.min"
= csrf_meta_tag
那麼什麼可以去錯了嗎?爲什麼它不起作用?
如果您嘗試清除「assets」文件夾中的內容並再次運行rake資產:預編譯RAILS_ENV = production,那麼可以嗎? – MervS 2013-04-24 09:56:39
我做了'my_project/current/public/assets $ rm * -r'和 'my_project/current $ bundle exec rake assets:precompile RAILS_ENV = production',它仍然是一樣的。 – 2013-04-24 10:06:21