0

出于某种原因,我在使用 heroku 上的相同代码时遇到了生产问题。会有对此的解释吗?这是heroku日志:

Completed 500 Internal Server Error in 183ms
2012-07-07T23:15:41+00:00 app[web.1]: 
2012-07-07T23:15:41+00:00 app[web.1]: ActionView::Template::Error (gmaps4rails.css isn't precompiled):
2012-0
7-07T23:15:41+00:00 app[web.1]:     8:     = javascript_include_tag "application"
2012-07-07T23:15:41+00:00 app[web.1]:     9:     = csrf_meta_tags
2012-07-07T23:15:41+00:00 app[web.1]:     10:     = render 'layouts/shim'
2012-07-07T23:15:41+00:00 app[web.1]:     11:     = stylesheet_link_tag "gmaps4rails"
2012-07-07T23:15:41+00:00 app[web.1]:     12: 
2012-07-07T23:15:41+00:00 app[web.1]:     13:     %meta{ :name => "viewport", :content => "width=device-width, initial-scale=1.0"}
2012-07-07T23:15:41+00:00 app[web.1]:     14:   %body
2012-07-07T23:15:41+00:00 app[web.1]:   app/views/layouts/application.html.haml:11:in `_app_views_layouts_application_html_haml__610548992894307187_47414440'
4

2 回答 2

0

尝试将此添加到 config/production.rb

config.assets.precompile += %w( gmaps4rails.css )
于 2012-07-09T19:43:21.723 回答
0

您的 gmaps4rails css 不存在,请确保您在本地预编译并将其提交到 repo 或删除所有将强制 heroku 为您编译样式表的公共/css 文件。

于 2012-07-08T02:45:19.717 回答