【问题标题】:Deploying capistrano fails by ssh error when running `bundle install`运行 `bundle install` 时部署 capistrano 因 ssh 错误而失败
【发布时间】:2014-08-23 13:11:01
【问题描述】:

我正在使用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

我可以像这样在服务器上通过# 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

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

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

【问题讨论】:

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


    【解决方案1】:

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

    这就是错误的原因。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-02-12
      • 2012-09-04
      • 2020-11-28
      • 1970-01-01
      • 1970-01-01
      • 2014-08-09
      • 1970-01-01
      相关资源
      最近更新 更多