capistrano - NameError: uninitialized constant Net::SSH::KnownHosts::SUPPORTED_TYPE
Asked Answered
P

2

9

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 !

Pajamas answered 24/5, 2012 at 16:53 Comment(0)
B
13

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

Back answered 24/5, 2012 at 17:13 Comment(3)
Also, if you're downgrading and/or pointing to the fix in the branch noted below, make sure you run cap with bundle exec cap deploy otherwise bundler will pick up the 2.5.1 version you have installed already.Vitality
Just in case anyone wants the cheat sheat: $ gem uninstall net-ssh Select gem to uninstall: ` 1. net-ssh-2.3.0` ` 2. net-ssh-2.5.1` ` 3. All versions` > 2 Successfully uninstalled net-ssh-2.5.1Morganica
fixed as of 2.5.2. run bundle update to get latest version or specify the specific version in your GemfileFlank
S
0

I installed rvm-capistrano gem to solved this problem:

gem install rvm-capistrano

Surrejoinder answered 15/8, 2014 at 6:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.