I have an error with rails + nginx + unicorn in production
ActionView::Template::Error (application.css isn't precompiled):
I'm trying to deploy clean rails app with sqlite3. When i visit http://cayennepower.ru/posts i have We're sorry, but something went wrong error. On front page the static welcome page works good. In my app/log production.log i have such errors
Started GET "/posts" for 127.0.0.1 at 2012-12-12 06:47:48 +0100
Processing by PostsController#index as */*
Rendered posts/index.html.erb within layouts/application (0.4ms)
Completed 500 Internal Server Error in 3ms
ActionView::Template::Error (application.css isn't precompiled):
2: <html>
3: <head>
4: <title>CleanRails</title>
5: <%= stylesheet_link_tag "application", :media => "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb___741543018_80365330'
app/controllers/posts_controller.rb:7:in `index'
in config/enviroments/production.rb i placed
config.assets.compile = true
config.assets.precompile += %w( application.css )
i've run rake assets:precompile --trace RAILS_ENV=production
The trace log is
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/usr/local/rvm/rubies/ruby-1.9.3-p327/bin/ruby /usr/local/rvm/gems/ruby-1.9.3-p327/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
** Invoke assets:precompile:nondigest (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:nondigest
but i still has this error
my nginx.conf is
upstream cayennepower.ru {
server unix:/home/sites/cayennepower.ru/www/tmp/sockets/unicorn.sock;
# server 127.0.0.1:3000 fail_timeout=0;
}
my domain.conf file is
server {
listen 80;
server_name cayennepower.ru;
root /home/sites/cayennepower.ru/www/public;
try_files $uri/index.html $uri @unicorn;
location @unicorn {
#if (!-f $request_filename) {
proxy_pass http://cayennepower.ru;
break;
#}
}
}
Thank you very much for help guys!