0

I'm trying to deploy a rails app... and I'm following the capistrano deployment guide. I'm stuck at the test stage where I am supposed to run app.get("/") in the rails console. When I do so I get an error message related to the blueprint css tools I'm using in my app. Has anyone encountered a similar error about blueprint not being pre-compiled? I have no idea what to do next to try to fix this error. Thanks in advance for any suggestions you might have!

Here's the error output from the log file:

Started GET "/" for 12.13.14.15 at 2012-04-05 14:15:50 -0700
Processing by PagesController#home as HTML
Rendered pages/home.html.erb within layouts/application (1.1ms)
Rendered layouts/_stylesheets.html.erb (1.3ms)
Completed 500 Internal Server Error in 6ms

ActionView::Template::Error (blueprint/screen.css isn't precompiled):
    1: <!--[if lt IE9]>
    2: <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    3: <![endif]-->
    4: <%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %>
    5: <%= stylesheet_link_tag 'blueprint/print', :media => 'print' %>
    6: <!--[if lt IE 8]><%= stylesheet_link_tag 'blueprint/ie' %><![endif]-->
    7: <%= stylesheet_link_tag 'custom', :media => 'screen' %>
  app/views/layouts/_stylesheets.html.erb:4:in `_app_views_layouts__stylesheets_html_erb___2010157553399413981_33056460'
  app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb__4294160261947576619_31749320'
J K
  • 495
  • 2
  • 7
  • 22
  • 1
    You said this error occurs on test-stage? So different env from development? You checked your env? From Rails 3.1 on, its assumed that assets are precompiled on production. So you might need to precompile assets locally and add it to your repo OR you precompile assets serverside. I like to compile assets serverside just with a capistrano recipy. – Deradon Apr 05 '12 at 21:58
  • What I mean by test stage is: I'm testing what will be the production app from a rails console. You're right, it's definitely an asset precompile problem, I wasn't aware of this. Thanks. Can you suggest any good documentation on asset precompiling serverside with capistrano? I'm very new to ROR and Capistrano. – J K Apr 06 '12 at 00:50

1 Answers1

3

Try adding it to your config/application.rb

config.assets.precompile = %w(screen.css)

Webjedi
  • 4,677
  • 7
  • 42
  • 59
  • Keep in production.rb since development.rb might not need it pre-compiled – Sairam Apr 05 '12 at 22:01
  • Ooops. Spoke too soon. I was fooled by the fact that the error output no longer shows up in the console output. It does, however, show up in the log output. The error remains. – J K Apr 06 '12 at 00:44
  • Can anyone suggest examples of a good capistrano asset precompile recipe? – J K Apr 06 '12 at 00:47
  • So far none of the suggestions have helped. I'm still getting the ActionView:Template:Error. I've created a more detailed posting here: http://stackoverflow.com/questions/10177186/asset-precompilation-error-from-blueprint-css – J K Apr 30 '12 at 17:14