Rails app 504 Timeout with unicorn and nginx

Posted January 20, 2014 6.6k views
Hey guys, I followed this article ( to deploy a Rails app on a Ubuntu droplet, but I'm getting 504 everytime like the guy in the comments. Someone have already found a resolution?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
5 answers
Nginx is not receiving a response from Unicorn, check the logs in /home/unicorn/log/unicorn.log for more information.
I checked the log and I'm having this

PS: I checked gem list and bundler is installed
Now I have a distinct error. I installed some gems that where with wrong versions and ran bundle exec rake assets:precompile, but the unicorn.log shows:

"You have already activated rack 1.5.2, but your Gemfile requires rack 1.4.4. Prepending `bundle exec` to your command may solve this"
Try running "bundle exec" as the error suggests.

Check /etc/hostname and make sure your droplet name is in there.