On Rails, Postgres, Passenger & Capistrano…

by tokumine

We’re sorry, but something went wrong.

You’re using the above combination, and it’s your first time deploying this app via capistrano. You get this:

wrong wrong wrong

A one way ticket to baldness

Not so bad you think. Then you go to the logs where you find precisely nothing. No logs. Zip.

The production.log files are empty, as are the apache logs. You’ve got nothing to go on, and it still works fine locally…

Regain

Like your future self, you could spend the next 4 hrs of your life working out what the heck is going on with no log feedback, or you could simply make sure that you have your environments.rb file ownership set to be the same as your Postgres user. Make sure you’ve got this somewhere in your deploy.rb. I put it in the restart task I wrote:

sudo "chown postgres:postgres  #{current_path}/config/environment.rb"

p157_02

Advertisements