Question

Can't restart unicorn after cap deploy.

  • Posted on July 15, 2014
  • drkmennAsked by drkmenn

I am trying to deploy an Rails app (unicorn, nginx). Using:

require 'capistrano/rvm'
require 'capistrano/bundler'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
And tried to run after 'deploy:finished':
execute "cd #{release_path} && bundle exec unicorn -c #{release_path}/config/unicorn.rb -E #{fetch(:stage)} -D"

I get a

DEBUG[72b6d5f6] Command: bundle exec unicorn -c /home/mb/st/staging/releases/20140715135329/config/unicorn.rb -E staging -D
DEBUG[72b6d5f6] 	bash: /usr/local/bin/bundle: /usr/bin/ruby1.8: bad interpreter: No such file or directory

Ubuntu 14.04 x84


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.

don’t know why, but gem rdoc used Ruby 1.8. sudo gem update - solved the problem

Nope, i won’t use Ruby 1.8. In my droplet was 2.0 by default and i want use 2.0. I can’t understand why he trying to get Ruby 1.8. And also i use rvm.

rvm list =* ruby-2.0.0-p353 [ x86_64 ]

Do you mean to use Ruby 1.8? It’s pretty outdated. It also sounds like it isn’t installed. Try upgrading the system ruby or implementing rbenv/rvm.