Bundler因Cap Production Deploy而失败

时间:2014-10-21 00:32:05

标签: ruby-on-rails capistrano capistrano3

我正在努力学习和设置过去几天的Capistrano。到目前为止它是如何进行的:

$ 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

正如您所看到部署失败并出现捆绑退出状态:5。我不知道这意味着什么,但我使用以下命令修复了此问题:

$ sudo gem update --system

现在,当我运行$ cap production deploy时,我收到以下错误:

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

所以现在它抱怨退出状态16,哈!

除此之外学习这一点非常令人沮丧,因为日志没有显示任何有意义的消息来寻找解决方法。或者,如果他们这样做,我不知道从哪里选择'退出状态:16'的含义并修复capistrano,以便简化(如果确实这样做!/ sarcasm)我的部署过程。

编辑:设置需要签入Gemfile.lock。问题已修复。另外我认为它可以帮助任何人在你的deploy.rb文件中设置:log_level,:debug而不是:info。

2 个答案:

答案 0 :(得分:1)

好的,这就是我解决它的方法:

Capistrano需要签入Gemfile.lock。从.gitignore文件中删除该行并将其提交到存储库中。

此外,如果它可以帮助任何人,那么在deploy.rb文件上设置:log_level,:debug(而不是:info)是有意义的。

答案 1 :(得分:1)

将Rails从4.1.x升级到4.2后,我开始遇到类似的错误。我通过删除共享包目录来修复它。这是我采取的步骤:

  1. SHH进入服务器
  2. cd /my/app/shared/bundle/ruby
  3. rm -rf 2.1.0或其他“版本”目录
  4. 重新运行部署cap production deploy
  5. 此时,您可能会遇到内存问题(我在部署到DigitalOcean Droplet时执行了此操作)。解决方法是在Droplet上创建并启用交换文件。