Skip to content

Instantly share code, notes, and snippets.

@Marko-M
Last active June 11, 2016 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Marko-M/f9517c7acfcdff75e976d82fb750dbe3 to your computer and use it in GitHub Desktop.
Save Marko-M/f9517c7acfcdff75e976d82fb750dbe3 to your computer and use it in GitHub Desktop.
Vagrant 1.8.3 with Ubuntu 16.04 LTS
#!/bin/bash
# Marko Martinović
# https://devgenii.com/
#
# Workaround for issue where Vagrant fails to install plugins due to RubyGems > v2.3.0 and Bundler Gem v1.12.0:
#
# ... `block in sort_dependencies': undefined method `payload' for nil:NilClass (NoMethodError)
#
# For example Vagrant 1.8.3 installed from .deb package @ HashiCorp website on Ubuntu 16.04 LTS.
# Install bundler v 1.12.5 globally
sudo gem install bundler -v '1.12.5'
# Symlink to /opt
sudo ln -s /var/lib/gems/2.3.0/gems/bundler-1.12.5 /opt/vagrant/embedded/gems/gems/bundler-1.12.5
sudo ln -s /var/lib/gems/2.3.0/specifications/bundler-1.12.5.gemspec \
/opt/vagrant/embedded/gems/specifications/bundler-1.12.5.gemspec
# Adjust specs
sed -e "s|<= 1.12.0|<= 1.12.5|g" /opt/vagrant/embedded/gems/specifications/vagrant-1.8.3.gemspec > vagrant-1.8.3.gemspec.tmp && \
sudo mv vagrant-1.8.3.gemspec.tmp /opt/vagrant/embedded/gems/specifications/vagrant-1.8.3.gemspec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment