This might be a suitable patch for vagrant, but I clearly don't understand enough of what vagrant is doing there in the first place. (The patch makes vagrant plugin install vagrant-libvirt work for me, but that's the only thing I tried.)
--- 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 -- 2.7.0