dotless-de / vagrant-vbguest

A Vagrant plugin to keep your VirtualBox Guest Additions up to date
MIT License
2.88k stars 209 forks source link

undefined method `group_by' for nil:NilClass #244

Closed t1gor closed 7 years ago

t1gor commented 7 years ago

Hi,

I have the following error while trying to install the plugin:

$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' 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>'

Versions info: # vagrant -v && ruby -v && lsb_release -d && VBoxManage -v

Could you please point me to what am I doing wrong?

fnordfish commented 7 years ago

Hi

No idea. Looks like purely vagrant internals to me. Can you try upgrading vagrant? IIRC 1.8 had some trouble with gem/plugin dependencies.

--
Robert Schulze

From: Igor Timoshenkov notifications@github.com(mailto:notifications@github.com) Reply: dotless-de/vagrant-vbguest reply@reply.github.com(mailto:reply@reply.github.com) Date: 23 January 2017 at 11:36:45 To: dotless-de/vagrant-vbguest vagrant-vbguest@noreply.github.com(mailto:vagrant-vbguest@noreply.github.com) CC: Subscribed subscribed@noreply.github.com(mailto:subscribed@noreply.github.com) Subject: [dotless-de/vagrant-vbguest] undefined method `group_by' for nil:NilClass (#244)

Hi,

I have the following error while trying to install the plugin:

$ vagrant plugin install vagrant-vbguest Installing the 'vagrant-vbguest' plugin. This can take a few minutes... /usr/lib/ruby/2.3.0/rubygems/specification.rb:946:in all=': undefined methodgroup_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:ininternal_install' from /usr/lib/ruby/vendor_ruby/vagrant/bundler.rb:102:in install' from /usr/lib/ruby/vendor_ruby/vagrant/plugin/manager.rb:62:inblock 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:incall' from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in call' from /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:116:incall' 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:inbusy' from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in run' from /usr/share/vagrant/plugins/commands/plugin/command/base.rb:14:inaction' 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:ineach' from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:31:in execute' from /usr/share/vagrant/plugins/commands/plugin/command/root.rb:56:inexecute' from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:42:in execute' from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:268:incli' from /usr/bin/vagrant:173:in `

'

Versions info:

vagrant -v && ruby -v && lsb_release -d && VBoxManage -v

Vagrant 1.8.1 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] OS: Ubuntu 16.04.1 LTS VirtualBox: 5.0.24_Ubuntur108355

Could you please point me to what am I doing wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub(https://github.com/dotless-de/vagrant-vbguest/issues/244), or mute the thread(https://github.com/notifications/unsubscribe-auth/AAAyJ6SNnmwkHxUP0z9eV6YKFzN6Q-Ymks5rVIK9gaJpZM4Lq4qX).

agur commented 6 years ago

Still getting a similar issue, any ideas?

$ vagrant plugin update vagrant-hostmanager
Updating plugins: vagrant-hostmanager. This may take a few minutes...
/usr/lib/ruby/2.3.0/rubygems/specification.rb:948: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:149:in `update'
    from /usr/lib/ruby/vendor_ruby/vagrant/plugin/manager.rb:111:in `update_plugins'
    from /usr/share/vagrant/plugins/commands/plugin/action/update_gems.rb:23: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/update.rb:23: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>'
$ vagrant -v && ruby -v && lsb_release -d && VBoxManage -v
Vagrant 1.8.1
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
Description:    Linux Mint 18.3 Sylvia
5.0.40_Ubuntur115130
$ 
p-alik commented 6 years ago

I'm also looking for a solution

VBoxManage -v
Vagrant 1.8.1
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
Description:    Ubuntu 16.04.5 LTS
5.1.38_Ubuntur122592
p-alik commented 6 years ago

looks like it is an Vagrant 1.8.1 issue. I solved it by patching lib/vagrant/bundler.rb as described https://stackoverflow.com/a/36991648/2789312

fnordfish commented 6 years ago

Hey all, just out of curiosity: Is there a reason you stick with vagrant 1.8.1? I mean it was released December 21, 2015

p-alik commented 6 years ago

Ubuntu offers me only 1.8.1

$ apt-cache policy vagrant
vagrant:
  Installed: 1.8.1+dfsg-1ubuntu0.2
  Candidate: 1.8.1+dfsg-1ubuntu0.2
  Version table:
 *** 1.8.1+dfsg-1ubuntu0.2 500
        500 http://de.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        500 http://de.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages
        100 /var/lib/dpkg/status
     1.8.1+dfsg-1 500
        500 http://de.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://de.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
fnordfish commented 6 years ago

oh wow, didn't know. thanks!

richard-scott commented 6 years ago

The Debian release works just fine on Ubuntu: https://www.vagrantup.com/downloads.html