Skip to content

Instantly share code, notes, and snippets.

@christi3k
Created May 19, 2016 00:49
Show Gist options
  • Save christi3k/27f426d7f51cdc85f9b730ef7c3e912d to your computer and use it in GitHub Desktop.
Save christi3k/27f426d7f51cdc85f9b730ef7c3e912d to your computer and use it in GitHub Desktop.
fixes issue with installing vagrant plugins on vagrant 1.8.1 and ubuntu 16.04 (see http://stackoverflow.com/questions/36811863/cant-install-vagrant-plugins-in-ubuntu-16-04/36991648#36991648)
---
lib/vagrant/bundler.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/vagrant/bundler.rb b/lib/vagrant/bundler.rb
index 5a5c185..c4a3837 100644
--- a/lib/vagrant/bundler.rb
+++ b/lib/vagrant/bundler.rb
@@ -272,7 +272,6 @@ module Vagrant
# Reset the all specs override that Bundler does
old_all = Gem::Specification._all
- Gem::Specification.all = nil
# /etc/gemrc and so on.
old_config = nil
@@ -286,6 +285,8 @@ module Vagrant
end
Gem.configuration = NilGemConfig.new
+ Gem::Specification.reset
+
# Use a silent UI so that we have no output
Gem::DefaultUserInteraction.use_ui(Gem::SilentUI.new) do
return yield
@christi3k
Copy link
Author

sudo patch --directory /usr/lib/ruby/vendor_ruby/vagrant < vagrant-plugin.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment