I am struggeling to get my rails 3.2 app running on a nginx - passenger - ruby 1.9.3 setup.

here is what I already did:

installed passenger gem
installed rvmsudo passenger-install-nginx-module

I added this to my nginx conf at /opt/nginx/conf/nginx.conf

server {
  listen 80;
  passenger_enabled on;
  passenger_spawn_method smart;
  rails_env staging;
  root /var/rails/current/public;

I deployed via Capistrano and everything seems to be deployed correctly. I had some issues (database.yml couldn't be found) on first try and the passenger exception page appeared so I guess passenger is running.

Passenger exception page also shows up if there is an error within a model so passenger seems to have access to all of the code.

After I fixed this it seems like the Rails app is not booting up. The staging.log stays empty and calls to my domain end up with a HTTP 504 error after a few minutes.

Static error pages within the rails public directory like http://mydomain.com/500.html are served without problems.

What can be the reason for this behavior? Are there passenger / nginx log files I can check?

Update: I am running all this on a EC2 Ubuntu instance - maybe this is important.


NOTE: this is a direct duplicate of this question on stackoverflow.com. I am new to serverfault but i guess this is the better place for this question - so feel free to vote for delete on stackoverflow.com.


Did the same thing as i did on Ubuntu 12.04 now on Ubuntu 11.10 and it works without problems. Maybe someone discovers the same problem and knows how to solve it unter Ubuntu 12.04!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.