-1
這是我第一次嘗試部署我的應用程序,並在嘗試訪問我的應用程序時不斷收到此消息。最初,我設置了config.assets.initialize_on_precompile = false
,然後必須運行RAILS_ENV=production bundle exec rake assets:precompile
,這似乎工作。我推動了這些變化,並且仍然得到這個「出錯的信息」的信息。如何解決導軌錯誤「mystylesheet.css未預編譯」?
這裏是Heroku的日誌輸出有關:
2013-11-23T07:26:41.379104+00:00 heroku[web.1]: State changed from starting to up
2013-11-23T07:26:43.642205+00:00 app[web.1]: => Call with -d to detach
2013-11-23T07:26:43.642205+00:00 app[web.1]: => Booting WEBrick
2013-11-23T07:26:43.642205+00:00 app[web.1]: => Rails 3.2.13 application starting in production on http://0.0.0.0:25369
2013-11-23T07:26:43.642205+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-11-23T07:26:43.642205+00:00 app[web.1]: Started GET "/" for 50.131.49.136 at 2013-11-23 07:26:43 +0000
2013-11-23T07:26:43.731222+00:00 heroku[router]: at=info method=GET path=/ host=blooming-garden-2746.herokuapp.com fwd="50.131.49.136" dyno=web.1 connect=2ms service=124ms status=500 bytes=643
2013-11-23T07:26:43.728706+00:00 app[web.1]: app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb___52334082019471513_69845865556860'
2013-11-23T07:26:43.728706+00:00 app[web.1]:
2013-11-23T07:26:43.728706+00:00 app[web.1]: ActionView::Template::Error (mystylesheet.css isn't precompiled):
2013-11-23T07:26:43.728706+00:00 app[web.1]: 2: <html>
2013-11-23T07:26:43.728706+00:00 app[web.1]: 3: <head>
2013-11-23T07:26:43.728706+00:00 app[web.1]: 4: <title>Hire Monkey | <%= yield(:title) %></title>
2013-11-23T07:26:43.728706+00:00 app[web.1]: 5: <%= stylesheet_link_tag "mystylesheet", :media => "all" %>
2013-11-23T07:26:43.728706+00:00 app[web.1]: 6: <%= stylesheet_link_tag 'homecss' if params[:action] == 'home' %>
2013-11-23T07:26:43.728706+00:00 app[web.1]: 7: <%= stylesheet_link_tag 'mainbg' if params[:action] != 'home' %>
2013-11-23T07:26:43.728870+00:00 app[web.1]:
2013-11-23T07:26:43.728706+00:00 app[web.1]: 8: <!--I removed the default stylesheet_link_tag and the application.css file to prevent my stylesheets from compiling together so I could display the homepage background image on the homepage only-->
2013-11-23T07:26:43.728870+00:00 app[web.1]:
2013-11-23T07:26:43.729146+00:00 app[web.1]: Processing by JobsController#home as HTML
2013-11-23T07:26:43.729146+00:00 app[web.1]: Rendered jobs/home.html.erb within layouts/application (18.0ms)
2013-11-23T07:26:43.729146+00:00 app[web.1]: Completed 500 Internal Server Error in 29ms