tur*_*2oh 10 ruby-on-rails heroku ruby-on-rails-3 asset-pipeline cedar
我在Heroku Cedar堆栈上使用Rails并且在编译资产时没有抛出任何问题,但后来我得到了500个内部服务器错误:
2012-06-25T23:22:59+00:00 app[web.1]: ActionView::Template::Error (bootstrap-datepicker.js isn't precompiled):
Run Code Online (Sandbox Code Playgroud)
知道可能导致这种情况的原因吗?这是我包含的javascript文件(除了我在本地下载)https://github.com/eternicode/bootstrap-datepicker/blob/master/js/bootstrap-datepicker.js
我将它包含在我的application.html.erb中,如下所示:
<%= javascript_include_tag "bootstrap-datepicker" %>
Run Code Online (Sandbox Code Playgroud)
是因为它不是coffeescript文件吗?任何帮助表示赞赏!
tur*_*2oh 20
我想到了.我不得不将它添加到config.assets.precompile中的production.rb
在production.rb中我将它添加到我的config.assets.precompile:
config.assets.precompile += %w( jquery.dataTables.min.js jquery-ui-1.8.21.custom.min.js jquery-ui-1.8.21.custom.css bootstrap-datepicker.js fullcalendar.js)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4212 次 |
| 最近记录: |