msimonin / vagrant-g5k

Hacking around vagrant and g5k
MIT License
3 stars 1 forks source link

Failed to install on Debian stretch: Gem::ConflictError on `net-ssh` #15

Open jonglezb opened 7 years ago

jonglezb commented 7 years ago

I tried to install vagrant-g5k according to the README on Debian stretch, but it fails because of a dependency:

$ sudo apt install vagrant
...
$ vagrant plugin install vagrant-g5k
Installing the 'vagrant-g5k' plugin. This can take a few minutes...
/usr/lib/ruby/2.3.0/rubygems/specification.rb:2289:in `raise_if_conflicts': Unable to activate vagrant-g5k-0.9.7, because net-ssh-3.2.0 conflicts with net-ssh (~> 4.1.0) (Gem::ConflictError)
    from /usr/lib/ruby/2.3.0/rubygems/specification.rb:1410:in `activate'
...
$ ruby --version
ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
$ vagrant --version
Vagrant 1.9.1
jonglezb commented 7 years ago

Fixed by forcing installation of version 0.9.6 of the plugin:

$ vagrant plugin install vagrant-g5k --plugin-version 0.9.6

The compatibility issue was introduced in 29f823c2460e03d5d93e6b2077d1af1b0d17e63b

msimonin commented 7 years ago

29f823c upgrades the version of net-ssh to be compatible with vagrant 1.9.5. In your case you are using 1.9.1, it explains the conflict and the workaround you found. I suggest to upgrade your vagrant version (download it from the website) : last version is 2.0.0

jonglezb commented 7 years ago

Ok, I prefer to use vagrant from the Debian package, isn't there a way to specify conditional dependencies?

msimonin commented 7 years ago

Do you mean query which version of vagrant is installed and set the right version for the dependencies ? I guess that it's possible in the gemspec file.

msimonin commented 7 years ago

@jonglezb did you figured out something ?

jonglezb commented 7 years ago

I had a look but it does not look easy (or even possible). But I know absolutely nothing about Ruby so I may have missed something.