capistrano - NameError: uninitialized constant Net::SSH::KnownHosts::SUPPORTED_TYPE

走远了吗. 提交于 2019-12-10 12:44:16

问题


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).

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)

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 ?

I'm using RVM with Ruby 1.9.3-p194.

Thanks !


回答1:


Reverting back from net-ssh 2.5.1 to 2.4.0 seems to solve the problem for now.




回答2:


I installed rvm-capistrano gem to solved this problem:

gem install rvm-capistrano



来源:https://stackoverflow.com/questions/10741936/capistrano-nameerror-uninitialized-constant-netsshknownhostssupported-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!