当运行' bundle install '时,由于ssh错误部署capistrano失败



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

上次大约2个月前我可以部署没有问题,但现在我不能通过ssh错误部署在VPS服务器上运行bundle install

我将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

我可以通过# gem install rake在服务器上手动安装rake (10.3.2):

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

但即使更新了部署错误仍然存在。

我应该怎么做才能消除这个错误?欢迎提出任何建议。

服务器"au-m.rubygems.org"好像宕机了。

最新更新