Ric*_*ton 8 ruby-on-rails heroku
我已将这两行添加到application.rb:
config.assets.initialize_on_precompile = false
config.assets.compile = true
Run Code Online (Sandbox Code Playgroud)
但是,当我推送到Heroku时,我仍然会遇到错误:
2012-02-05T09:48:34+00:00 app[web.1]: Completed 500 Internal Server Error in 3ms
2012-02-05T09:48:34+00:00 app[web.1]:
2012-02-05T09:48:34+00:00 app[web.1]: ActionView::Template::Error (bootstrap.css isn't precompiled):
Run Code Online (Sandbox Code Playgroud)
有什么建议?
Pet*_*ete 13
根据它的外观,你有一个bootstrap.css文件没有正确包含在你的清单文件中app/assets/stylesheets,你可能也直接从一个stylesheet_tag.
有几种方法:
config.assets.precompile += %w( bootstrap.css )
…例如.
/**=需要bootstrap*/
/*文件的其余部分省略*/
您可能需要更多文件,具体取决于您的css设置.
| 归档时间: |
|
| 查看次数: |
7772 次 |
| 最近记录: |