diff --git a/lib/vagrant/bundler.rb b/lib/vagrant/bundler.rb index 7a903a2cc..1773081de 100644 --- a/lib/vagrant/bundler.rb +++ b/lib/vagrant/bundler.rb @@ -205,7 +205,7 @@ module Vagrant # native extensions because it causes all sorts of problems. old_rubyopt = ENV["RUBYOPT"] old_gemfile = ENV["BUNDLE_GEMFILE"] - ENV["BUNDLE_GEMFILE"] = nil + ENV["BUNDLE_GEMFILE"] = Tempfile.new("vagrant-gemfile").path ENV["RUBYOPT"] = (ENV["RUBYOPT"] || "").gsub(/-rbundler\/setup\s*/, "") # Set the GEM_HOME so gems are installed only to our local gem dir