我想我的應用程序部署到的Heroku。 Heroku的不載入我JS和CSS文件部署到Heroku的資產管道鏈輪:: fileNotFound
我跑RAILS_ENV=production bundle exec rake assets:precompile
,它仍然不能正常工作。
然後我跑 heroku rake assets:precompile
我得到這個錯誤在Heroku的日誌:
Error compiling asset application.css:
Sprockets::FileNotFound: couldn't find file 'jquery.ui.datepicker'
(in /app/app/assets/stylesheets/application.css.scss:13)
Served asset /application-989f5e5266d9b066eb316183d7db5c77.css - 500 Internal Server Error
Error compiling asset application.js:
Sprockets::FileNotFound: couldn't find file 'jquery.ui.datepicker'
(in /app/app/assets/javascripts/application.js:16)
Served asset /application-d81c946c6f47242e5e97de9bca4938be.js - 500 Internal Server Error
配置production.rb:
config.cache_classes = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.serve_static_assets = true
config.assets.compress = true
config.assets.compile = true
config.assets.initialize_on_precompile = false
config.assets.digest = true
在資產 application.css.scss
*= require_self
*= require bootstrap_and_overrides
*= require jquery.ui.datepicker
*= require bootstrap-timepicker
*= require jquery.fileupload-ui
*= require_tree .
*/
的application.js
//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require jquery.ui.datepicker
//= require bootstrap-timepicker
//= require jquery-fileupload/basic
//= require jquery-fileupload/vendor/tmpl
//= require_tree .
任何想法如何解決這一問題?在此先感謝您的幫助。
由於Skrollr庫有類似的錯誤,並且這解決了問題。 –