运行`bundle install`时,部署capistrano失败了ssh错误

时间:2014-08-23 13:11:02

标签: ruby-on-rails ruby deployment ssh capistrano

我正在使用Capistrano 3将Rails项目部署到VPS服务器(CentOS 6.5)。

上次大约2个月前我可以毫无问题地部署,但现在我在VPS服务器上运行bundle install时无法通过ssh错误进行部署。

我将ruby版本2.0.0-p451更新为2.1.1,但它不会更改错误消息。

这是错误消息:

INFO[057e025d] Running RBENV_ROOT=/usr/local/rbenv RBENV_VERSION=2.1.1 /usr/local/rbenv/bin/rbenv exec bundle install --binstubs /var/www/example.com/shared/bin --path /var/www/example.com/shared/bundle --without development test --deployment --quiet on example.com
DEBUG[057e025d] Command: cd /var/www/example.com/releases/20140823122915 && ( RBENV_ROOT=/usr/local/rbenv RBENV_VERSION=2.1.1 RBENV_ROOT=/usr/local/rbenv RBENV_VERSION=2.1.1 /usr/local/rbenv/bin/rbenv exec bundle install --binstubs /var/www/example.com/shared/bin --path /var/www/example.com/shared/bundle --without development test --deployment --quiet )
DEBUG[057e025d]     Gem::RemoteFetcher::FetchError: Errno::ETIMEDOUT: Connection timed out - connect(2) for "au-m.rubygems.org" port 443 (https://rubygems.org/gems/rake-10.3.2.gem)
DEBUG[057e025d]     An error occurred while installing rake (10.3.2), and Bundler cannot continue.
DEBUG[057e025d]     Make sure that `gem install rake -v '10.3.2'` succeeds before bundling.
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host example.com: bundle exit status: 5
bundle stdout: Nothing written
bundle stderr: Nothing written

SSHKit::Command::Failed: bundle exit status: 5
bundle stdout: Nothing written
bundle stderr: Nothing written

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 example.com: bundle exit status: 5
bundle stdout: Nothing written
bundle stderr: Nothing written

我可以rake (10.3.2)在服务器上手动安装# gem install rake,如下所示:

rake's executable "rake" conflicts with /usr/local/rbenv/versions/2.1.1/bin/rake
Overwrite the executable? [yN]  y
Successfully installed rake-10.3.2
Parsing documentation for rake-10.3.2
Installing ri documentation for rake-10.3.2
Done installing documentation for rake after 2 seconds
1 gem installed

但即使在更新部署错误后仍然存在同样的问题。

我该怎么做才能删除错误? 任何建议表示赞赏。

1 个答案:

答案 0 :(得分:0)

看起来服务器“au-m.rubygems.org”已关闭。

这就是错误的原因。

相关问题