Reputation: 10111
I have a ROR app and i am trying to improve performance by loading the asset pipeline.
on my layout file i am calling
= stylesheet_link_tag 'users/application_login', :media => "all"
When i run it in development it works perfect
ss
=> Booting Thin
=> Rails 3.2.11 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
=> Debugger enabled
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
but when i run it as production it tells me that my assets are not precompiled
RAILS_ENV=production rails server
=> Booting Thin
=> Rails 3.2.11 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
Started GET "/users/sign_in" for 127.0.0.1 at 2013-06-25 13:52:18 -0400
Processing by Users::SessionsController#new as HTML
Rendered users/sessions/new.html.haml within layouts/login (539.8ms)
Completed 500 Internal Server Error in 860ms
** [Airbrake] Success: Net::HTTPOK
ActionView::Template::Error (users/application_login.css isn't precompiled):
i am running
RAILS_ENV=production rake assets:precompile
and i see some files on /public/assets/users/ but not application_login.css
What can i do?
Upvotes: 0
Views: 126
Reputation: 6786
config.assets.precompile += %w( application_login.css )
Upvotes: 4