capistrano - NameError:未初始化的常量Net :: SSH :: KnownHosts :: SUPPORTED_TYPE

时间:2012-05-24 16:53:13

标签: ruby-on-rails ruby capistrano rvm-capistrano

我正在尝试将我的Rails(3.1.3)应用程序部署到preprod env。 我使用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。

谢谢!

2 个答案:

答案 0 :(得分:13)

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

答案 1 :(得分:0)

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

gem install rvm-capistrano