mitchellh/vagrant-google

Error on macOS Mojave: cannot load such file -- trollop

claudio-vellage opened this issue · 3 comments

I'm running macOS mojave, tried installing vagrant with brew and also downloaded from vagrantup directly.

Steps to reproduce

  • brew cask install vagrant (or download and install Vagrant)
  • vagrant plugin install google
  • vagrant up --provider=google

Actual result

Vagrant failed to initialize at a very early stage:

The plugins failed to load properly. The error message given is
shown below.

cannot load such file -- trollop

Expected result

Instance should be created on GCE.

Additional info

Because vagrant is using its own ruby, I can't even install trollop manually. How to resolve this issue? I would like to use GCE for my VMs, since running VMs on my own computer with something like virtualbox is so last century.

Is this plugin even maintained anymore? I mean, when running vagrant plugin install, it installs something like version 0.0.2. Any way to get a more recent version of this plugin, or is this already the latest version?

@LRH539
I've upgraded my machine to Mojave to test this but I cannot reproduce the behaviour you're specifying:

 2.4.3 ~ [13:41:41]∞
temikus λ vagrant --version
Vagrant 2.1.5
 2.4.3 ~ [13:41:45]∞
temikus λ vagrant plugin install vagrant-google
Installing the 'vagrant-google' plugin. This can take a few minutes...
Fetching: excon-0.62.0.gem (100%)
Fetching: formatador-0.2.5.gem (100%)
Fetching: fog-core-2.1.0.gem (100%)
Fetching: fog-json-1.2.0.gem (100%)
Fetching: mini_portile2-2.3.0.gem (100%)
Fetching: nokogiri-1.8.5.gem (100%)
Building native extensions.  This could take a while...
Fetching: fog-xml-0.1.3.gem (100%)
Fetching: uber-0.1.0.gem (100%)
Fetching: declarative-0.0.10.gem (100%)
Fetching: declarative-option-0.1.0.gem (100%)
Fetching: representable-3.0.4.gem (100%)
Fetching: retriable-3.1.2.gem (100%)
Fetching: public_suffix-3.0.3.gem (100%)
Fetching: addressable-2.5.2.gem (100%)
Fetching: multipart-post-2.0.0.gem (100%)
Fetching: faraday-0.15.4.gem (100%)
Fetching: jwt-2.1.0.gem (100%)
Fetching: signet-0.11.0.gem (100%)
Fetching: memoist-0.16.0.gem (100%)
Fetching: os-1.0.0.gem (100%)
Fetching: googleauth-0.6.7.gem (100%)
Fetching: google-api-client-0.23.9.gem (100%)
Fetching: fog-google-1.8.1.gem (100%)
Fetching: vagrant-google-2.2.1.gem (100%)
Installed the plugin 'vagrant-google (2.2.1)'!

VM starts up normally as well:

λ vagrant up --provider google
Bringing machine 'default' up with 'google' provider...
==> default: Checking if box 'google/gce' is up to date...
==> default: Launching an instance with the following settings...
...
==> default: Machine is booted and ready for use!

Considering you're mentioning version 0.0.2 and the latest version is 2.2.1 I think you may have issues with your environment.

I just checked and now everything seems to work now. I have no idea why it kept installing 0.0.2, I tried uninstalling vagrant multiple times and reinstalling it from vagrantup.com as well as using brew. Now my output looks exactly like yours. This can be closed, I guess. I can finally use the google provider.

@LRH539 Great to hear it worked out!

I'm not sure why, to be honest. vagrant-google is just a rubygem essentially. I checked and there's no such version on rubygems:

λ gem list vagrant-google --remote --all

*** REMOTE GEMS ***

tcr-vagrant-google (0.1.4)
vagrant-google (2.2.1, 2.2.0, 2.1.0, 2.0.0, 1.0.0, 0.2.5, 0.2.4, 0.2.3, 0.2.2, 0.2.1, 0.2.0, 0.1.5, 0.1.4, 0.1.3)

However, if it was 0.2.X, then it uses a slightly different set of dependencies. Maybe something got messed up in the vagrant built-in ruby and it resolved to the old version. But that's only a theory, can't say much more without debugging data.

I'll close this out but feel free to reopen if you experience any additional issues.