vagrant --help displays a rubygems error

Created on 25 Apr 2017  ·  39Comments  ·  Source: hashicorp/vagrant

Vagrant version

$ vagrant --version
1.9.4
### Host operating system
$ sw_ver
ProductName:     Mac OS X
ProductVersion:   10.12.4
BuildVersion:    16E195
### Expected behavior `vagrant` and `vagrant --help` prints a list of commands ### Actual behavior A rubygems error occurs.
/opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- vagrant-share/helper/api (LoadError)
from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:244:in `'
from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:16:in `RGLoader_load'
from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:16:in `'
from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share.rb:23:in `block in '
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:75:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:75:in `block (2 levels) in help'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/registry.rb:49:in `block in each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/registry.rb:48:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/registry.rb:48:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:69:in `block in help'
from /opt/vagrant/embedded/lib/ruby/2.2.0/optparse.rb:917:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:57:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:57:in `help'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:32:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:308:in `cli'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/bin/vagrant:127:in `
'

Steps to reproduce

  1. Install vagrant from the web
  2. Run vagrant --help
bug core share

Most helpful comment

To fix this error:

$ vagrant plugin install vagrant-share --plugin-version 1.1.8

All 39 comments

This is a 1.9.4 thing,
it happens when running just vagrant too

I think the latest Vagrant build is just incomplete. Same error on Ubuntu 17.04.

Also happening on Windows 10 (vagrant 1.9.1 on other machine is working okay)

I concur that Vagrant 1.9.4 doesn't work on Windows 10.

I upgraded Vagrant to 1.9.4 on Windows 8. Same error occurs.

C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file
-- vagrant-share/helper/api (LoadError)
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:244:in `<encoded>
'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:16:in `RGLoader_l
oad'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:16:in `<top (requ
ired)>'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share.rb:23:in `block in <class:Plu
gin>'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:75:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:75:in `block (2 levels) in help'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/registry.rb:49:in `block in each'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/registry.rb:48:in `each'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/registry.rb:48:in `each'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:69:in `block in help'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/optparse.rb:917:in `initialize'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:57:in `new'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:57:in `help'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:32:in `execute'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:308:in `cli'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/bin/vagrant:127:in `<main>'

To fix this error:

$ vagrant plugin install vagrant-share --plugin-version 1.1.8

Can confirm that upgrading vagrant-share from 1.1.7 to 1.1.8 stops the rubygems error.

I also confirm @chrisroberts' solution 👍 Thanks :)

非常感谢,这个命令解决了问问难题

Any idea if a 1.9.5 version is going to be released quickly to address this?

I second the question, 1.9.4 is still posted on official site, this is just bad considering there in no official notice about this bug and you need to go out of your way to download the older versions.

I'm airgapped so can't update offline to get the older version :( How do1.1.8 plugin and install?

@stephenconnolly1 First fetch the gem:

$ gem fetch --clear-sources --source https://gems.hashicorp.com vagrant-share

move gem to offline machine, then install as plugin:

$ vagrant plugin install ./vagrant-share-1.1.8.gem

vagrant plugin install vagrant-share --plugin-version 1.1.8 only fix vagrant --help and vagrant command, but when starting virtual machine from Windows 7 Host the error still happens:

development: Warning: Remote connection disconnect. Retrying...

==> development: Forcing shutdown of VM...
==> development: Destroying VM and associated drives...
C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/server_version.rb:54:in readpartial': An established connection was aborted by the software in your host machine. (Errno::ECONNABORTED) from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/server_version.rb:54:inblock (2 levels) in negotiate!'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/server_version.rb:52:in loop' from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/server_version.rb:52:inblock in negotiate!'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/server_version.rb:50:in loop' from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/server_version.rb:50:innegotiate!'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/server_version.rb:32:in initialize' from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/session.rb:84:innew'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/transport/session.rb:84:in initialize' from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh.rb:233:innew'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh.rb:233:in start' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/communicators/ssh/communicator.rb:397:inblock (2 levels) in connect'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:88:in block in timeout' from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:inblock in catch'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in catch' from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:incatch'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:103:in timeout' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/communicators/ssh/communicator.rb:371:inblock in connect'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/util/retryable.rb:17:in retryable' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/communicators/ssh/communicator.rb:370:inconnect'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/communicators/ssh/communicator.rb:68:in block in wait_for_ready' from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:88:inblock in timeout'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in block in catch' from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:incatch'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:32:in catch' from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/timeout.rb:103:intimeout'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/communicators/ssh/communicator.rb:46:in wait_for_ready' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/action/builtin/wait_for_communicator.rb:16:inblock in call'

@belcebus See #8520.

Thanks! That works for me!

Regards

Christrobert's solution works. Was wanting to try Vagrant for the first time today and ran into the error. Would be very helpful if the official version was updated lest confusion ensue..

I can confirm that the advice by @chrisroberts above to perform:
vagrant plugin install vagrant-share --plugin-version 1.1.8
has worked for me on a recently upgraded to Vagrant 1.9.4 Win10 machine.

Thanks.

The workaround works, but as soon as you do a vagrant plugin update it reverts back to 1.1.7.

Glad I found this thread. I had a problem with "Vagrant up" on 1.9.3... I am new, so I reinstalled with Vagrant 1.9.4, imagine my surprise when I got that error. Good that Vagrant plugin update worked on Win10/64. Thanks.

Bump – it would be really nice if this went out asap

thx

vagrant: 1.9.4
osx: 10.12.4

➜  ~ vagrant
/opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- vagrant-share/helper/api (LoadError)
    from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:244:in `<encoded>'
    from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:16:in `RGLoader_load'
    from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:16:in `<top (required)>'
    from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'

Confirmed that fresh instal of 1.9.4 on windows was fixed by:
vagrant plugin install vagrant-share --plugin-version 1.1.8

@chrisroberts There is reason to not release bug fix asap?

the problem also exists for vagrant v1.9.3

Like others mentioned, issue is fixed on Win 10 by updating the vagrant-share plugin version - hopefully this is fixed in next release

I'm on Windows 10.
I tried vagrant plugin install vagrant-share --plugin-version 1.1.8.
It didn't work.

I then ran a vagrant plugin update
vagrant-share reverted to 1.1.7
vagrant-hostmanager upgraded to 1.8.6 (from 1.8.5)
and vagrant-vbguest upgraded to 0.14.2 (from 0.13.0)
All working now.
Hope this helps.

Thanks, it works fine with: vagrant plugin install vagrant-share --plugin-version 1.1.8

vagrant plugin install vagrant-share --plugin-version 1.1.8 That work on osx 10.12.4

vagrant plugin install vagrant-share --plugin-version 1.1.8 work on osx 10.11.6

vagrant plugin install vagrant-share --plugin-version 1.1.8 work on Windows 8 + Babun

Hey, guys, it's not a census, I'm pretty sure everybody have already caught on the fact that this fixes the issue. 😄

:P They are happy! @adiachenko

Also, you don't have to go that far back to get a working version. Just a heads up.

Fixed in 1.9.5 release. Cheers!

Confirming it's been fixed in v1.9.5.
Too bad it's not noted in CHANGELOG.md

Thanks @chrisroberts for your comment. It worked perfectly. Fwiw, my issue arose after upgrading from macOS Sierra to High Sierra.

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings