我正在使用gem bootstrap-timepicker-rails 我遇到了这个错误
Sprockets::FileNotFound (couldn't find file 'bootstrap-timepicker'
在生产服务器中,但我添加到预编译列表..
布局中
<%= javascript_include_tag 'ceo/ceo', @js_controller_action #( ceo/service/class_new.js) %>
CEO /服务/ class_new.js.coffee
//=(or #=) require bootstrap-timepicker
application.rb中
config.assets.paths << Rails.root.join("vendor", "lib")
config.assets.precompile += ['ceo/*', 'bootstrap-timpicker.js', 'blueimp-gallery-all.js'...]
公共/资产(在服务器中部署资产路径)
...
ceo/service/class_new-MD5HASH.js
...
bootstrap-timepicker-MD5HASH.js
blueimp-gallery-all-MD5HASH.js
...
如果我请求此网址,错误页面打开并在服务器日志中显示..
Sprockets::FileNotFound (couldn't find file 'bootstrap-timepicker' ...) ~~class_new.js.coffee:2)
然而 blueimp-gallery-all in blueimp-gallery-rails gem运作良好
在@js_controller_action(.js.coffee)
//=require blueimp-gallery-all
blueimp功能效果很好。没错。
为什么blueimp有效并且bootstrap-timepicker不起作用?