diff --git a/lib/vagrant/util/subprocess.rb b/lib/vagrant/util/subprocess.rb index e249b72c1..e610151d2 100644 --- a/lib/vagrant/util/subprocess.rb +++ b/lib/vagrant/util/subprocess.rb @@ -91,6 +91,15 @@ module Vagrant end end + # Reset the Bundler environment back - this is required for anyone who + # is not using the official Vagrant installers and is running Vagrant + # via bundler + if defined?(Bundler::ORIGINAL_ENV) + Bundler::ORIGINAL_ENV.each do |k, v| + process.environment[k] = v + end + end + # Set the environment on the process if we must if @options[:env] @options[:env].each do |k, v|