Report this

What is the reason for this report?

Can't restart unicorn after cap deploy.

Posted on July 15, 2014

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



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!

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.

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

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.

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 ]

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.