Search code examples
ruby-on-railscapistranocapistrano3

Bundler fails with Cap Production Deploy


I'm trying to learn and set up Capistrano for past few days. Here is how it went so far:

$ cap production deploy

** Execute bundler:install
INFO[10336cab] Running /usr/local/rvm/bin/rvm 2.1.2 do bundle install --binstubs /var/www/MyAPP/shared/bin --path /var/www/MyAPP/shared/bundle --without development test --deployment --quiet on IP.IP.IP.IP
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host IP.IP.IP.IP: bundle exit status: 5
bundle stdout: Nothing written
bundle stderr: Nothing written
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/command.rb:97:in `exit_status='
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:148:in `block (5 levels) in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:551:in `call'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:551:in `do_request'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:561:in `channel_request'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:205:in `process'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `block in loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:269:in `wait'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:170:in `block (3 levels) in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:514:in `call'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:514:in `do_open_confirmation'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:545:in `channel_open_confirmation'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:205:in `process'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `block in loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:172:in `block (2 levels) in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:186:in `with_ssh'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:131:in `block in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:128:in `tap'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:128:in `_execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:66:in `execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:35:in `block (5 levels) in <top (required)>'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/abstract.rb:85:in `with'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:26:in `block (4 levels) in <top (required)>'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/abstract.rb:77:in `within'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:25:in `block (3 levels) in <top (required)>'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
SSHKit::Command::Failed: bundle exit status: 5
bundle stdout: Nothing written
bundle stderr: Nothing written
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/command.rb:97:in `exit_status='
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:148:in `block (5 levels) in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:551:in `call'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:551:in `do_request'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:561:in `channel_request'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:205:in `process'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `block in loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:269:in `wait'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:170:in `block (3 levels) in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:514:in `call'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:514:in `do_open_confirmation'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:545:in `channel_open_confirmation'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:205:in `process'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `block in loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:172:in `block (2 levels) in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:186:in `with_ssh'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:131:in `block in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:128:in `tap'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:128:in `_execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:66:in `execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:35:in `block (5 levels) in <top (required)>'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/abstract.rb:85:in `with'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:26:in `block (4 levels) in <top (required)>'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/abstract.rb:77:in `within'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:25:in `block (3 levels) in <top (required)>'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
Tasks: TOP => deploy:updated => bundler:install
The deploy has failed with an error: #<SSHKit::Runner::ExecuteError: Exception while executing on host IP.IP.IP.IP: bundle exit status: 5
bundle stdout: Nothing written
bundle stderr: Nothing written
>
** Invoke deploy:failed (first_time)
** Execute deploy:failed

As you can see deploy failed with bundle exit status: 5. I don't know what that means, but I fixed this with the following command:

$ sudo gem update --system

Now when I run $ cap production deploy I get the following error:

cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host IP.IP.IP.IP: bundle exit status: 16
bundle stdout: Nothing written
bundle stderr: Nothing written
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/command.rb:97:in `exit_status='
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:148:in `block (5 levels) in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:551:in `call'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:551:in `do_request'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:561:in `channel_request'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:205:in `process'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `block in loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:269:in `wait'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:170:in `block (3 levels) in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:514:in `call'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:514:in `do_open_confirmation'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:545:in `channel_open_confirmation'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:205:in `process'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `block in loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:172:in `block (2 levels) in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:186:in `with_ssh'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:131:in `block in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:128:in `tap'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:128:in `_execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:66:in `execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:35:in `block (5 levels) in <top (required)>'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/abstract.rb:85:in `with'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:26:in `block (4 levels) in <top (required)>'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/abstract.rb:77:in `within'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:25:in `block (3 levels) in <top (required)>'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
SSHKit::Command::Failed: bundle exit status: 16
bundle stdout: Nothing written
bundle stderr: Nothing written
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/command.rb:97:in `exit_status='
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:148:in `block (5 levels) in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:551:in `call'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:551:in `do_request'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:561:in `channel_request'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:205:in `process'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `block in loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:269:in `wait'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:170:in `block (3 levels) in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:514:in `call'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/channel.rb:514:in `do_open_confirmation'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:545:in `channel_open_confirmation'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:205:in `process'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `block in loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/net-ssh-2.9.1/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:172:in `block (2 levels) in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:186:in `with_ssh'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:131:in `block in _execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:128:in `tap'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:128:in `_execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:66:in `execute'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:35:in `block (5 levels) in <top (required)>'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/abstract.rb:85:in `with'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:26:in `block (4 levels) in <top (required)>'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/abstract.rb:77:in `within'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/capistrano-bundler-1.1.3/lib/capistrano/tasks/bundler.cap:25:in `block (3 levels) in <top (required)>'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/admin/.rvm/gems/ruby-2.1.2/gems/sshkit-1.5.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
Tasks: TOP => deploy:updated => bundler:install
(See full trace by running task with --trace)
The deploy has failed with an error: #<SSHKit::Runner::ExecuteError: Exception while executing on host IP.IP.IP.IP: bundle exit status: 16
bundle stdout: Nothing written
bundle stderr: Nothing written

So now it's complaining about exit status 16, ha!

Learning aside this has been quite frustrating because the logs don't show any meaningful message to look for a fix around. Or if they do, I don't know where to pick the meaning of 'exit status: 16' from and fix capistrano so that it simplifies (if it really does! /sarcasm) my deployment process.

EDIT: The set up requires Gemfile.lock to be checked in. The issue is fixed. Also I think it'd help anyone out there to set :log_level, :debug instead of :info in your deploy.rb file.


Solution

  • Okay, here is how I solved it:

    Capistrano requires the Gemfile.lock to be checked in. Remove the line from .gitignore file and commit it into the repository.

    Also if it'd help anyone out there, it makes sense to set :log_level, :debug (instead of :info) on your deploy.rb file.