devopsgroup-io/vagrant-digitalocean

Can Not Install on Windows

Closed this issue · 3 comments

I have tried installing using with both Ruby's version 2.2.3 and 2.1.7 with DevKit installed and keep arriving at the following error message. I have done gem install json -v '1.8.3' and that is successful. I have also been able to install your version of Bundler.

Installing the 'vagrant-digitalocean' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that gem install json -v '1.8.3' succeeds before bundling.

Warning: this Gemfile contains multiple primary sources. Using source more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run bundle config disable_multisource true.Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

"C:/Program Files (x86)/Vagrant/embedded/bin/ruby.exe" extconf.rb

creating Makefile

make "DESTDIR="
generating generator-i386-mingw32.def
/bin/sh: -c: line 0: syntax error near unexpected token x86' /bin/sh: -c: line 0:/C/Program\ Files\ (x86)/Vagrant/embedded/bin/ruby -e "puts 'EXPORTS', 'Init_generator'" > generator-i386-mingw32.def'
make: *** [generator-i386-mingw32.def] Error 2

Gem files will remain installed in C:/Users/Brian/.vagrant.d/gems/gems/json-1.8.3 for inspection.
Results logged to C:/Users/Brian/.vagrant.d/gems/gems/json-1.8.3/ext/json/ext/generator/gem_make.out

Here is a bit about my PATH variable which might help pinpoint which tool is causing the problem:

C:\Users\Brian\AppData\Local\Programs\Ruby21\bin;C:\Users\Brian\AppData\Roaming\npm;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Brian\AppData\Local\Programs\Git\cmd;C:\Users\Brian\AppData\Local\Programs\Git\mingw64\bin;C:\Users\Brian\AppData\Local\Programs\Git\usr\bin;C:\Users\Brian\AppData\Local\Android\android-sdk\platform-tools;C:\Users\Brian\AppData\Local\Programs\Python

I tried taking out C:\Users\Brian\AppData\Local\Programs\Git\mingw64\bin;C:\Users\Brian\AppData\Local\Programs\Git\usr\bin but that did not help.

As you point out, that's an issue with the json gem on Windows. I'd recommend opening an issue against that project since they likely have a lot more experience getting the gem working on Windows.

Hi.. the gem successfully downloads/installs when I install it directly but when I install this plugin it throws the error. Has anyone gotten this plugin to work on Windows?

If so, do you know anything about their environment settings? What ruby version, what command prompt etc?