我正在尝试将我的应用程序部署到Heroku。Heroku 没有加载我的js和css文件
我跑了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
配置生产.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
在资产应用程序.css.scss
*= require_self
*= require bootstrap_and_overrides
*= require jquery.ui.datepicker
*= require bootstrap-timepicker
*= require jquery.fileupload-ui
*= require_tree .
*/
应用程序.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 .
知道如何解决这个问题吗?提前感谢您的所有帮助。