RailsCasts Pro episodes are now free!

Learn more or hide this

Amit Ambardekar's Profile

GitHub User: amitamb

Site: http://www.amitamb.com/

Comments by Amit Ambardekar

Avatar

It deployed correctly the first time but after second deploy it stopped working. I was getting problems with nginx and unicorn.

The problem was related to permission for unicorn_blog service. In deploy.rb we are starting the app with normal permissions.

ruby
run "/etc/init.d/unicorn_#{application} #{command}"

After changing it to

ruby
sudo "/etc/init.d/unicorn_#{application} #{command}"

everything started to work.

I don't know why it is necessary. I followed all instructions correctly.