9

我正在尝试将我的 Rails (3.1.3) 应用程序部署到 preprod 环境。我使用 capistrano (2.12.0) 和 rvm-capistrano (1.2.2)。

当我打电话bundle exec cap ssh时,它工作正常。但是当我打电话时,bundle exec cap deploy我得到以下跟踪:

$ cap deploy
    triggering start callbacks for `deploy'
  * 18:42:19 == Currently executing `multistage:ensure'
*** Defaulting to `preprod'
  * 18:42:19 == Currently executing `preprod'
  * 18:42:19 == Currently executing `deploy'
  * 18:42:19 == Currently executing `deploy:update'
 ** transaction: start
  * 18:42:19 == Currently executing `deploy:update_code'
  * 18:42:19 == Currently executing `deploy:set_previous_revision'
  * executing "cd /rails_apps/com.example.preprod/current; git rev-parse --short HEAD"
    servers: ["preprod.example.com"]
connection failed for: preprod.example.com (NameError: uninitialized constant Net::SSH::KnownHosts::SUPPORTED_TYPE)

当然example.com是占位符,它不是来自 capistrano 配置中的错误。

知道什么可能导致这种情况吗?

我将 RVM 与 Ruby 1.9.3-p194 一起使用。

谢谢 !

4

2 回答 2

13

从 net-ssh 2.5.1 恢复到 2.4.0 似乎暂时解决了这个问题。

于 2012-05-24T17:13:58.200 回答
0

我安装了 rvm-capistrano gem 来解决这个问题:

gem install rvm-capistrano

于 2014-08-15T06:37:31.377 回答