前言說我是Capistrano的新手。話雖如此,我已經有了一個功能性的應用程序,我曾使用過Capistrano多次部署過。我做了幾個更新的應用程序,並嘗試cap production deploy
。我得到這個錯誤輸出:Capistrano部署失敗 - SSH工具包?
** Invoke deploy:check (first_time)
** Execute deploy:check
** Invoke git:check (first_time)
** Invoke git:wrapper (first_time)
** Execute git:wrapper
00:00 git:wrapper
01 mkdir -p /tmp/dentalimager/
cap aborted!
ArgumentError: wrong number of arguments (0 for 1)
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/capistrano-3.5.0/lib/capistrano/dsl/env.rb:16:in `any?'
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.11.1/lib/sshkit/host.rb:84:in `block in netssh_options'
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.11.1/lib/sshkit/host.rb:83:in `tap'
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.11.1/lib/sshkit/host.rb:83:in `netssh_options'
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/capistrano-3.5.0/lib/capistrano/configuration/server.rb:59:in `netssh_options'
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.11.1/lib/sshkit/backends/netssh.rb:159:in `with_ssh'
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.11.1/lib/sshkit/backends/netssh.rb:108:in `execute_command'
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.11.1/lib/sshkit/backends/abstract.rb:141:in `block in create_command_and_execute'
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.11.1/lib/sshkit/backends/abstract.rb:141:in `tap'
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.11.1/lib/sshkit/backends/abstract.rb:141:in `create_command_and_execute'
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.11.1/lib/sshkit/backends/abstract.rb:74:in `execute'
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/capistrano-3.5.0/lib/capistrano/tasks/git.rake:16:in `block (3 levels) in <top (required)>'
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.11.1/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.11.1/lib/sshkit/backends/abstract.rb:29:in `run'
/home/patrick/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/sshkit-1.11.1/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => git:check => git:wrapper
The deploy has failed with an error: wrong number of arguments (0 for 1)
** Invoke deploy:failed (first_time)
** Execute deploy:failed
它在我看來像Capistrano和SSHkit之間有問題。我回頭看看我的Gemfile,根據我的git repo,在bundle update
之後顯示SSHkit從v 1.10.0變爲v 1.11.1。
sshkit gem中的更新是否會導致此問題,或者我應該在別處查看?如果是這樣,我將如何恢復到1.10.0並在我的Gemfile中指定特定版本以避免將來出現問題?
感謝您的建議@馬特 - 我做的建議,但似乎仍然有同樣的錯誤。我回頭看看我的分歧,看來Capistrano-rails也從1.1.6更新到1.1.7。由於改變SSHkit似乎沒有幫助,我將嘗試在Capistrano/rails上打開一個問題 – PSCampbell