0

I'm getting below in my production server:

Started GET "/" for 101.160.190.206 at 2013-09-05 00:11:28 +1000
Processing by HomeController#index as HTML
  Rendered home/index.html.erb within layouts/application (0.5ms)
Completed 500 Internal Server Error in 2ms

ActionView::Template::Error (application.css isn't precompiled):
    4:     <meta name="viewport" content="width=device-width, initial-scale=1.0">
    5:     <title><%= content_for?(:title) ? yield(:title) : "Tools" %></title>
    6:     <meta name="description" content="<%= content_for?(:description) ? yield(:description) : "Tools" %>">
    7:     <%= stylesheet_link_tag "application", :media => "all" %>
    8:     <%= javascript_include_tag "application" %>
    9:     <%= csrf_meta_tags %>
    10:     <%= yield(:head) %>
  app/views/layouts/application.html.erb:7:in `_app_views_layouts_application_html_erb__153052184121312410_16560580'

I ran rake assets:precompile and it seems to compile correctly as I can see in the assets file but I'm still getting

We're sorry, but something went wrong.

error.

I'm not sure where it went wrong...

Passionate Engineer
  • 10,034
  • 26
  • 96
  • 168

1 Answers1

1

If you haven't modified anything application.css should be included by default into assets, so try running:

RAILS_ENV=production rake assets:precompile

instead of

rake assets:precompile

which takes default environment which is by default development. At least that was an 'issue' I've faced several weeks ago, so maybe it's same in that case.

zrl3dx
  • 7,699
  • 3
  • 25
  • 35