Vagrant - berks error when attempting vagrant up - macos

I'm trying to vagrant up a custom box in my local Mac machine. Because of an issue with VirtualBox's version, I had to format and reinstall OSx. I've installed Chef DK, Vagrant and installed the berkshelf plugin. When I try to vagrant up, I get the following error:
Bringing machine 'default' up with 'virtualbox' provider...
/opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- bundler (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-1.9.0/lib/vagrant/util/env.rb:1:in `<top (required)>'
from /Users/cdelgado/.vagrant.d/gems/2.2.5/gems/vagrant-berkshelf-5.1.1/lib/vagrant-berkshelf/helpers.rb:62:in `berks'
from /Users/cdelgado/.vagrant.d/gems/2.2.5/gems/vagrant-berkshelf-5.1.1/lib/vagrant-berkshelf/action/check.rb:33:in `berkshelf_version_check!'
from /Users/cdelgado/.vagrant.d/gems/2.2.5/gems/vagrant-berkshelf-5.1.1/lib/vagrant-berkshelf/action/check.rb:16:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/builtin/call.rb:53:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/machine.rb:225:in `action_raw'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/machine.rb:200:in `block in action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/environment.rb:567:in `lock'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/machine.rb:186:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/machine.rb:186:in `action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
from /opt/vagrant/embedded/gems/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:in `call'
My current setup is:
Vagrant Version 1.9.0
Chef Development Kit Version: 1.0.3
chef-client version: 12.16.42
delivery version: master (83358fb62c0f711c70ad5a81030a6cae4017f103)
berks version: 5.2.0
kitchen version: 1.13.2
vagrant-berkshelf (5.1.1)
vagrant-omnibus (1.5.0)
vagrant-share (1.1.6)
When I disable berkshelf in the recipe it runs, but obviously the dependencies don't work.
If I downgrade the berkshelf plugin to 5.0.0 I get a different error:
Bringing machine 'default' up with 'virtualbox' provider...
/Users/cdelgado/.vagrant.d/gems/2.2.5/gems/vagrant-berkshelf-5.0.0/lib/vagrant-berkshelf/helpers.rb:62:in `berks': uninitialized constant VagrantPlugins::Berkshelf::Helpers::Bundler (NameError)
from /Users/cdelgado/.vagrant.d/gems/2.2.5/gems/vagrant-berkshelf-5.0.0/lib/vagrant-berkshelf/action/check.rb:33:in `berkshelf_version_check!'
from /Users/cdelgado/.vagrant.d/gems/2.2.5/gems/vagrant-berkshelf-5.0.0/lib/vagrant-berkshelf/action/check.rb:16:in `call'
I've been googling for days now with no luck, please help.

After many days googling with a colleague, we compared our versions and narrowed the problem down to the Vagrant version. I was running 1.9.0 and he was running 1.8.4. Since the same recipe did work on his machine, I downgraded Vagrant to his version and voilá, it worked. We still don't know what's the exact difference and why does this problem occur, but this will do for now.
I hope this helps whoever stumbles into this problem.

You need to upgrade or install your vagrant-share plugin.
Run this command:
vagrant plugin install vagrant-share --plugin-version 1.1.8
Adapt the version based on the newest or desired one.
If it doesn't work for you (worked for me), there is an issue on GitHub about this
here.

Related

Method missing error when running vagrant

My development environment relies on vagrant and virtual box. Everything used to work until a few days ago. Since then, every time I try to run vagrant up, I'm getting this error message.
I don't really know what to do about it. Any advice?
C:/Users/D3TzH/.vagrant.d/gems/2.4.4/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/dsl.rb:90:in `method_missing': undefined method `run_remote=' for #<VagrantPlugins::Triggers::DSL:0x00000000049cb5b8> (NoMethodError)
from D:/Projects/D3TzH/D3TzH-environment/Vagrantfile:41:in `block (2 levels) in <top (required)>'
from C:/Users/D3TzH/.vagrant.d/gems/2.4.4/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/dsl.rb:11:in `instance_eval'
from C:/Users/D3TzH/.vagrant.d/gems/2.4.4/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/dsl.rb:11:in `fire!'
from C:/Users/D3TzH/.vagrant.d/gems/2.4.4/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/action/trigger.rb:52:in `block in fire_triggers'
from C:/Users/D3TzH/.vagrant.d/gems/2.4.4/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/action/trigger.rb:51:in `each'
from C:/Users/D3TzH/.vagrant.d/gems/2.4.4/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/action/trigger.rb:51:in `fire_triggers'
from C:/Users/D3TzH/.vagrant.d/gems/2.4.4/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/action/trigger.rb:18:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builder.rb:116:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/runner.rb:102:in `block in run'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/busy.rb:19:in `busy'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/runner.rb:102:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/machine.rb:238:in `action_raw'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/machine.rb:209:in `block in action'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/environment.rb:615:in `lock'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/machine.rb:195:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/machine.rb:195:in `action'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
With the release of Vagrant 2.1.0, the functionality of the vagrant-triggers plugin was incorporated into the core Vagrant product. As noted in the Vagrant 2.1.0 announcement, the plugin is now incompatible with versions of Vagrant >= 2.1.0:
This work was heavily inspired by the fantastic community plugin vagrant-triggers by #emyl. It is a complete rewrite of the plugin, so the two are not compatible.
Given that situation, the error is most likely fixed by uninstalling the third party vagrant-triggers plugin.

vagrant-librarian-chef requires ruby version >= 2.0 public_suffix in ubuntu

I try to run following command:
vagrant plugin install vagrant-librarian-chef
Installing the 'vagrant-librarian-chef' plugin. This can take a few minutes...
/usr/lib/ruby/1.9.1/rubygems/installer.rb:388:in `ensure_required_ruby_version_met': public_suffix requires Ruby version >= 2.0. (Gem::InstallError)
from /usr/lib/ruby/1.9.1/rubygems/installer.rb:156:in `install'
from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:297:in `block in install'
from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each'
from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each_with_index'
from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `install'
from /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:65:in `block in call'
from /usr/share/vagrant/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
from /usr/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
from /usr/share/vagrant/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
from /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:52:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
from /usr/share/vagrant/plugins/commands/plugin/action/bundler_check.rb:20: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:69: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:69:in `run'
from /usr/share/vagrant/plugins/commands/plugin/command/base.rb:17:in `action'
from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:27:in `execute'
from /usr/share/vagrant/plugins/commands/plugin/command/root.rb:56:in `execute'
from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:38:in `execute'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:484:in `cli'
from /usr/bin/vagrant:127:in `<main>'
I am trying this on Ubuntu 14.04
I have been able to sucessfully install the following vagrant plugins:
vagrant-vbguest
vagrant-omnibus
vagrant-triggers
vagrant-hostmanager
As far as I can read there, you are using ruby 1.9.1 and the error message is that you need at least ruby 2.0 for that plugin.
Try updating ruby to a newer version. Also try using a tool like rbenv to manage multiple ruby versions, in case you need ruby 1.9.1 for future projects.

vagrant-aws plugin installation error

I am trying to install the aws plugin for vagrant but getting an error. I am running vagrant 1.9 on macOS Sierra 10.12.1. I have no ruby expertise so I can use all the help you can provide.
I tried installing ruby version 2.3.3, but based on the paths below vagrant is using the embedded version.
vagrant plugin install vagrant-aws
Installing the 'vagrant-aws' plugin. This can take a few minutes...
/opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'fog-xml' (>= 0) among 45 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/opt/vagrant/embedded/gems', execute `gem env` for more information
from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/specification.rb:1311:in `block in activate_dependencies'
from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/specification.rb:1300:in `each'
from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/specification.rb:1300:in `activate_dependencies'
from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/specification.rb:1282:in `activate'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/bundler.rb:319:in `block in activate_solution'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/bundler.rb:316:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/bundler.rb:316:in `activate_solution'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/bundler.rb:244:in `internal_install'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/bundler.rb:97:in `install'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/plugin/manager.rb:62:in `block in install_plugin'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/plugin/manager.rb:72:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/plugin/manager.rb:72:in `install_plugin'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/plugins/commands/plugin/action/install_gem.rb:37:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/plugins/commands/plugin/command/base.rb:14:in `action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/plugins/commands/plugin/command/install.rb:32:in `block in execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/plugins/commands/plugin/command/install.rb:31:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/plugins/commands/plugin/command/install.rb:31:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/plugins/commands/plugin/command/root.rb:66:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/cli.rb:42:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/environment.rb:308:in `cli'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/bin/vagrant:123:in `<main>'
This appears to be fixed in Vagrant 1.9.1, as I also had this same issue with the vagrant-rackspace plugin, but it installs fine now.
I am having exactly the same issue on current Arch Linux. I'll also add that even if I:
vagrant plugin install fog-xml
Installing the 'fog-xml' plugin. This can take a few minutes...
Installed the plugin 'fog-xml (0.1.2)'!
Or:
`gem install fog-xml`
I get the same error condition.

vagrant plugin install vagrant-windows fails

I'm trying to install the vagrant-windows plugin on a windows 7 (64 bit) machine, but I get the error below. How can I fix this?
further info:
ruby version installed on machine 1.9.3
in corporate environment (port 80, 443, 3389 open)
Vagrant installed via chocolatey (version 1.3.5)
This is the stacktrace:
Installing the 'vagrant-windows' plugin. This can take a few minutes...
C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems.rb:566:in `inflate': incorrect header check (Zlib::DataError)
from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems.rb:566:in `inflate'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:122:in `fetch_spec'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:95:in `block in fetch_with_errors'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:94:in `map'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:94:in `fetch_with_errors'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:110:in `find_gems_with_sources'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:174:in `block in add_found_dependencies'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:171:in `each'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:171:in `add_found_dependencies'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:142:in `gather_dependencies'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:267:in `install'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/action/install_gem.rb:49:in `block in call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/action/install_gem.rb:39:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builder.rb:116:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `block in run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/util/busy.rb:19:in `busy'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/command/base.rb:17:in `action'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/command/install.rb:27:in `execute'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/command/root.rb:52:in `execute'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/cli.rb:38:in `execute'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/environment.rb:478:in `cli'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.3.5/bin/vagrant:96:in `<top (required)>'
from C:/HashiCorp/Vagrant/bin//../embedded/../embedded/gems/bin/vagrant:23:in `load'
from C:/HashiCorp/Vagrant/bin//../embedded/../embedded/gems/bin/vagrant:23:in `<main>'
I'm not entirely sure what the problem was.
The solution however was to disable all unused network adapters.
The issue is tracked here.

Cant install Vagrant Plugin - Gem Failing

Trying to install the vagrant-digitalocean plugin for vagrant, but its having an issue install the gems required for it.
Installing the 'vagrant-digitalocean' plugin. This can take a few minutes...
/opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:562:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/opt/vagrant/embedded/bin/ruby extconf.rb
creating Makefile
make
compiling generator.c
In file included from /opt/vagrant/embedded/include/ruby-1.9.1/ruby.h:32:0,
from ../fbuffer/fbuffer.h:5,
from generator.c:1:
/opt/vagrant/embedded/include/ruby-1.9.1/ruby/ruby.h:105:14: error: size of array ‘ruby_check_sizeof_long’ is negative
/opt/vagrant/embedded/include/ruby-1.9.1/ruby/ruby.h:109:14: error: size of array ‘ruby_check_sizeof_voidp’ is negative
In file included from /opt/vagrant/embedded/include/ruby-1.9.1/ruby/intern.h:43:0,
from /opt/vagrant/embedded/include/ruby-1.9.1/ruby/ruby.h:1383,
from /opt/vagrant/embedded/include/ruby-1.9.1/ruby.h:32,
from ../fbuffer/fbuffer.h:5,
from generator.c:1:
/opt/vagrant/embedded/include/ruby-1.9.1/ruby/st.h:67:14: error: size of array ‘st_check_for_sizeof_st_index_t’ is negative
make: *** [generator.o] Error 1
Gem files will remain installed in /home/aaron/.vagrant.d/gems/gems/json-1.8.0 for inspection.
Results logged to /home/aaron/.vagrant.d/gems/gems/json-1.8.0/ext/json/ext/generator/gem_make.out
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:540:in `block in build_extensions'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `each'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `build_extensions'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:180:in `install'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:297:in `block in install'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each_with_index'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `install'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/action/install_gem.rb:49:in `block in call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/action/install_gem.rb:39:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/command/base.rb:17:in `action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/command/install.rb:44:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/command/root.rb:47:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/cli.rb:46:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/environment.rb:478:in `cli'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/bin/vagrant:84:in `<top (required)>'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'
This happened to me when I installed an i686 version of Vagrant on my Ubuntu x86_64 machine. Unfortunately, both version would install successfully but the wrong version would fail in this confusing way.
I was having issues with installing plugins with similar errors.
What fixed all the issues for me was updating to:
Vagrant 1.7.2
http://www.vagrantup.com/downloads
Ruby 2.2.0
Instructions: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you
Note: Just don't use his copy-paste instructions they are messed up, link over to the README files he has the links right above his copy-paste snippets.
This 100% fixed all my plugin install issues.
PS: Use sudo vagrant plugin install

Resources