From 3f9fb2ef03a78bc9177a52d4629a5e80e6e42b2e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 6 Jan 2014 09:27:26 -0800 Subject: [PATCH] core: reset the specification lookup when isolating gems --- lib/vagrant/bundler.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/bundler.rb b/lib/vagrant/bundler.rb index 184064cf3..28810d48c 100644 --- a/lib/vagrant/bundler.rb +++ b/lib/vagrant/bundler.rb @@ -161,7 +161,10 @@ module Vagrant # Clear paths so that it reads the new GEM_HOME setting Gem.paths = ENV - # Set a custom configuration to avoid loading ~/.gemrc loads and + # 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 begin @@ -185,6 +188,7 @@ module Vagrant Gem.configuration = old_config Gem.paths = ENV + Gem::Specification.all = old_all end # This is pretty hacky but it is a custom implementation of