Errors Installing vagrant.berkshelf

1.8k Views Asked by At

I working on a Windows 7 machine with Vagrant v 1.4.1 and I have been struggling to install the vagrant-berkshelf plugin. I'm following some instructions from a blog by Mischa Taylor. I've installed VirtualBox (4.2.20), a "sane" Ruby environment (with the DevKit) and the berkshelf gem and that went fine as well but whenever I issue the

> vagrant plugin install vagrant-berkshelf

The command returns an error when trying to build the

Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...

C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/ext/builder.rb:62:in `run': 
ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

C:/HashiCorp/Vagrant/embedded/bin/ruby.exe extconf.rb
C:/HashiCorp/Vagrant/embedded/bin/ruby.exe: invalid option -J  (-h will show valid
options) (RuntimeError)

Gem files will remain installed in C:/Users/user_me/.vagrant.d/gems/gems/hitimes-   
1.2.1 for inspection.
Results logged to C:/Users/user_me/.vagrant.d/gems/gems/hitimes-1.2.1/ext/hitimes/c/gem_make.out
    from    
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/ext/ext_conf_builder.rb:39:in `block in build'

if I issue

> gem install hitimes

that works fine, so the problem seems to be in the extension builder that Vagrant uses. I don't have alot of experience working with Ruby I was just wanting to start learning to use chef and berkshelf with vagrant.

1

There are 1 best solutions below

0
Francois On

This may be due to the version of Ruby try rvm to manage your ruby environments, download ruby 1.9.3 through rvm then

rvm use 1.9.3
vagrant plugin install vagrant-berkshelf