JavaJax
JavaJax

Reputation: 31

Capistrano v3 is trying to load ssh-kit twice and throwing a warning

I am trying to capify a project and when I run bundle exec cap staging -T I get a warning

/usr/local/Cellar/rbenv/0.4.0/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/sshkit-0.0.34/lib/sshkit.rb:3: warning: already initialized constant SSHKit::StandardError

/usr/local/opt/rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/sshkit-0.0.34/lib/sshkit.rb:3: warning: previous definition of StandardError was here

and then the output of the command including the list of tasks

cap deploy # Deploy a new release

cap deploy:check # Check required files and directories exist

...

I have tried removing all the other gems from bundler that would conflict with this but it seems like bundler itself locks this file at versions 2.6.6. I dont even know if it is bundler causing that problem.

Upvotes: 3

Views: 521

Answers (2)

Elia Schito
Elia Schito

Reputation: 979

It probably a problem related to symlinks inside rvm/rbenv/… it could be resolved avoiding require_relative inside the sshkit gem but in the meanwhile I think the only option is stick with the error and wait for this issue to be resolved.

Upvotes: 0

Tombart
Tombart

Reputation: 32436

Current version of sshkit is 1.3.0. Try running

$ bundle update

and write if you will still have problems. Sometimes the command:

$ gem outdated

can be useful for detecting old versions of gems.

Upvotes: 1

Related Questions