Question

unicorn/nginx doesn't work after changing default capistrano deployment directory

Hi Everyone,

I installed a ruby on rails pre-packaged version to ubuntu 12.4. And use capistrano to deploy my app. I changed the default app directory from /home/rails to /var/www/apps/. The deployment was successful, but i got unicorn errors and the end result is timeout on the page. Please help me with this, this has confused me for quite a while, I can’t really figure out why.

Thanks,


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi,

solution for rails 3.2.x is to stop unicorn and uninstall rack 1.5.2:

service unicorn stop
gem uninstall rack -v 1.5.2

after that I have also uninstalled rack 1.5.2 dependencies:

gem uninstall actionpack-4.1.6
gem uninstall actionpack-4.0.2

, but I thing it is not necessary.

Than run bundle install and restart nginx:

service nginx restart

Finally start unicorn:

service unicorn start

It should work. After that I had to solve some other problems, but it were small things compare to this problem.

Cheers Kuba

so what’s the solution?

There’s your error: <br><blockquote>/usr/local/rvm/gems/ruby-2.0.0-p353/gems/bundler-1.3.5/lib/bundler/runtime.rb:33:in `block in setup’: You have already activated rack 1.5.2, but your Gemfile requires rack 1.4.5. Using bundle exec may solve this. (Gem::LoadError)</blockquote>