I'm using Passenger + Nginx to run a Rails app. If i use "rails_env development;" the application works fine.
But if i run in production mode, i get "We're sorry, but something went wrong.".
I did ran db:migrate for production and i can access the database normally.
The strange thing is that i don't get any new entries in logs ( nginx and rails one ) and i made sure nginx user could write on them.
If i run rails console production, it works fine:
# rails console production Loading production environment (Rails 3.2.0) 1.9.3-p125 :001 >
Any ideas of what might be happening? What else should i check?
After @BenLee suggestion of adding passenger_debug_log_file to nginx.conf i started to get this error for both development and production:
# /etc/init.d/nginx restart nginx: the configuration file /opt/nginx/conf/nginx.conf syntax is ok nginx: [alert] Unable to start the Phusion Passenger watchdog: it seems to have crashed during startup for an unknown reason, with exit code 1 (-1: Unknown error) nginx: configuration file /opt/nginx/conf/nginx.conf test is successful Parando o nginx: [ OK ] Iniciando o nginx: nginx: [alert] Unable to start the Phusion Passenger watchdog: it seems to have crashed during startup for an unknown reason, with exit code 1 (-1: Unknown error) [ OK ]
I searched about this error but i still haven't found a solution. Watchdog seems to exist and is in the right place:
# ls -lh /usr/local/rvm/gems/ruby-1.9.3-p125/gems/passenger-3.0.11/agents/ total 7,8M drwxr-sr-x 2 root rvm 4,0K Fev 22 23:34 nginx -rwxr-xr-x 1 root rvm 4,6M Fev 22 23:35 PassengerLoggingAgent -rwxr-xr-x 1 root rvm 3,3M Fev 22 23:34 PassengerWatchdog
If i remove passenger_debug_log_file it starts normally. But the original problems comes back, application does not run in production mode.