问题描述
我正在尝试将Rails(3.1.3)应用程序部署到preprod env。
我使用capistrano(2.12.0)和rvm-capistrano(1.2.2)。
I'm trying to deploy my Rails (3.1.3) application to the preprod env.I use capistrano (2.12.0) and rvm-capistrano (1.2.2).
当我呼叫 bundle exec cap ssh时
可以正常工作。
但是当我调用 bundle exec cap deploy
时,会得到以下跟踪:
When I call bundle exec cap ssh
it works fine.But when I call bundle exec cap deploy
I get the following trace:
$ 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配置中的错误。
Of course example.com
is a placeholder, it doesn't come from a mistake in the capistrano config.
任何可能导致这种情况的想法吗?
Any idea of what could cause that ?
我正在将RVM与Ruby 1.9.3-p194一起使用。
I'm using RVM with Ruby 1.9.3-p194.
谢谢!
推荐答案
从net-ssh 2.5.1还原到2.4.0似乎可以解决以下问题:现在。
Reverting back from net-ssh 2.5.1 to 2.4.0 seems to solve the problem for now.
这篇关于capistrano-NameError:未初始化的常量Net :: SSH :: KnownHosts :: SUPPORTED_TYPE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!