devopsgroup-io / vagrant-hostmanager

:pencil: A Vagrant plugin that manages hosts files within a multi-machine environment.
Mozilla Public License 2.0
1.46k stars 146 forks source link

Installation on Ubuntu 16.04 #196

Open RobLoach opened 8 years ago

RobLoach commented 8 years ago

Ruby complains...

Installing the 'vagrant-hostmanager' plugin. This can take a few minutes...
/usr/lib/ruby/2.3.0/rubygems/specification.rb:946:in `all=': undefined method `group_by' for nil:NilClass (NoMethodError)
    from /usr/lib/ruby/vendor_ruby/vagrant/bundler.rb:275:in `with_isolated_gem'
    from /usr/lib/ruby/vendor_ruby/vagrant/bundler.rb:231:in `internal_install'
    from /usr/lib/ruby/vendor_ruby/vagrant/bundler.rb:102:in `install'
    from /usr/lib/ruby/vendor_ruby/vagrant/plugin/manager.rb:62:in `block in install_plugin'
    from /usr/lib/ruby/vendor_ruby/vagrant/plugin/manager.rb:72:in `install_plugin'
    from /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:37:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:116:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in `block in run'
    from /usr/lib/ruby/vendor_ruby/vagrant/util/busy.rb:19:in `busy'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in `run'
    from /usr/share/vagrant/plugins/commands/plugin/command/base.rb:14:in `action'
    from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:32:in `block in execute'
    from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:31:in `each'
    from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:31:in `execute'
    from /usr/share/vagrant/plugins/commands/plugin/command/root.rb:56:in `execute'
    from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:42:in `execute'
    from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:268:in `cli'
    from /usr/bin/vagrant:173:in `<main>'
seth-reeser commented 8 years ago

Try to reinstall after running sudo rm -Rf ~/.vagrant.d/gems/ && sudo rm ~/.vagrant.d/plugins.json (you will need to reinstall all of your vagrant plugins)... Also what version of Vagrant do you have installed?

RobLoach commented 8 years ago

1.8.3... Will try reinstalling plugins

fredw commented 8 years ago

Same problem here. Ruby version:

ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
jgonyea commented 8 years ago

I also had this issue the first time I attempted the plugin installation. What version of vagrant do you have? I thought I had installed 1.8.4 (latest), but somehow only 1.8.1 installed on my Ubuntu 16.04 machine. I re-downloaded the deb file to my ~/Downloads folder and ran the following: sudo dpkg -i ~/Downloads/vagrant_1.8.4_x86_64.deb

This properly upgraded vagrant. Installing the plugin worked as expected afterwards.

Hope that helps.

fredw commented 8 years ago

Thank you @jgonyea. I download and installed the Vagrant 1.8.5 and now vagrant-hostmanager installation worked! The problem was occurring in version 1.8.1, which was standard in Ubuntu 04.16.

cmoiccool commented 7 years ago

Same thing here, I upgraded from Vagrant 1.8.1 to Vagrant 1.9.3 (latest for now) and after this installation worked also.

jgonyea commented 7 years ago

I think this can be closed. @RobLoach, can you confirm?