Trying to deploy with capistrano (Bundle exec cap production deploy
), I run into this error:
first
** Invoke deploy:restart_sidekiq (first_time)
** Execute deploy:restart_sidekiq
** Invoke sidekiq:restart (first_time)
** Execute sidekiq:restart
** Invoke sidekiq:stop
** Invoke sidekiq:start (first_time)
** Execute sidekiq:start
after which
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deployer@99.999.99.999: sidekiq exit status: 127
sidekiq stdout: Nothing written
sidekiq stderr: zsh:1: command not found: bundle
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:16:in `rescue in block (2 levels) in execute'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
SSHKit::Command::Failed: sidekiq exit status: 127
sidekiq stdout: Nothing written
sidekiq stderr: zsh:1: command not found: bundle
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/command.rb:95:in `exit_status='
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:179:in `block in _execute'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `tap'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `_execute'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:66:in `execute'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/capistrano-sidekiq-0.5.4/lib/capistrano/tasks/sidekiq.rake:118:in `start_sidekiq'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/capistrano-sidekiq-0.5.4/lib/capistrano/tasks/sidekiq.rake:164:in `block (5 levels) in <top (required)>'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/capistrano-sidekiq-0.5.4/lib/capistrano/tasks/sidekiq.rake:37:in `block (2 levels) in for_each_process'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/abstract.rb:77:in `within'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/capistrano-sidekiq-0.5.4/lib/capistrano/tasks/sidekiq.rake:36:in `block in for_each_process'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/capistrano-sidekiq-0.5.4/lib/capistrano/tasks/sidekiq.rake:35:in `each'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/capistrano-sidekiq-0.5.4/lib/capistrano/tasks/sidekiq.rake:35:in `each_with_index'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/capistrano-sidekiq-0.5.4/lib/capistrano/tasks/sidekiq.rake:35:in `for_each_process'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/capistrano-sidekiq-0.5.4/lib/capistrano/tasks/sidekiq.rake:163:in `block (4 levels) in <top (required)>'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/capistrano-sidekiq-0.5.4/lib/capistrano/tasks/sidekiq.rake:226:in `switch_user'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/capistrano-sidekiq-0.5.4/lib/capistrano/tasks/sidekiq.rake:162:in `block (3 levels) in <top (required)>'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/glennjones/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
Tasks: TOP => sidekiq:start
The deploy has failed with an error: Exception while executing as deployer@99.999.99.999: sidekiq exit status: 127
sidekiq stdout: Nothing written
sidekiq stderr: zsh:1: command not found: bundle
** Invoke deploy:failed (first_time)
** Execute deploy:failed
I've tried to solve the problem with:
sudo gem install bundler
(as suggested here)bundle install
& rbenv rehash
, no changeWeird thing: another developer on my team, can simply deploy with the same command. This lead me to think it was an SSH-problem. Capistrano ssh-doctor however reports this is not the case.
Also, I have found this discussion, where they basically suggest altering the deploy.rb file. I'm hesitant to try this since we use rbenv and not rvm. Since I don't know what I'm doing here, I don't want to break the production server..
Any ideas or suggestions to what might cause this? And where to look to figure out how to solve it?
Much appreciated!
答案 0 :(得分:0)
通过删除我的gemfile.lock
并将其替换为旧版本来解决此问题。 (我在某处有bundle update
' - 不要随意捆绑更新。