I have my VPS fully configured with nginx + unicorn but I'm unable to get a production site working.
It doesn't matter if is just a Hello World or an app I wrote.
I run my app like:
unicorn_rails -c /srv/http/ruby/app/config/unicorn.rb -E development -D
And it works like charm, but if I run it on production mode, I always get 500.html
I will put my steps:
rails new hello
cd hello
rails g scaffold Person name:string
rake db:migrate
rm public/index.html
And I change the route to:
root :to => 'people#index'
In development mode it works like charm, in production , 500.html and the unicorn log says:
cache: [GET /] miss
Nothing more on unicorn / nginx logs.
Even without database, just an empty app, 500.html in production.
Otoh, I'm using RubyMine 4 to develop, if I try to run my app in production mode, same error so is not problem of nginx / unicorn.
do I need to configure anything when trying to use production mode?
Thanks a lot.
EDIT: On my app I have a redirection in a route to a login page and you can see how to browser redirect to that login page, but always showing the 500.html
EDIT: I saw the problem:
Im using this:
<%= stylesheet_link_tag "application", controller_name , :media => "all" %>
<%= javascript_include_tag "application", controller_name %>
And I deleted the require_tree . from the js and css.
I dont want to load all the css and js in every page. But thinking about production. Seems like it want to get ALL css and compress it in one and get ALL js and compress it in one js. I dont like that. So, am I stuck?