From 7fc4b4681b83b86d5871f0726460ea808bd76f1b Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Wed, 16 May 2012 03:35:12 -0700 Subject: Use Bundler.with_clean_env instead of custom code --- railties/lib/rails/generators/app_base.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'railties/lib/rails/generators/app_base.rb') diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 84de254f2f..742129e258 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -251,12 +251,9 @@ module Rails # Thanks to James Tucker for the Gem tricks involved in this call. _bundle_command = Gem.bin_path('bundler', 'bundle') - bundle_bin_path, bundle_gemfile, rubyopt = ENV['BUNDLE_BIN_PATH'], ENV['BUNDLE_GEMFILE'], ENV['RUBYOPT'] - ENV['BUNDLE_BIN_PATH'], ENV['BUNDLE_GEMFILE'], ENV['RUBYOPT'] = "", "", "" - - print `"#{Gem.ruby}" "#{_bundle_command}" #{command}` - - ENV['BUNDLE_BIN_PATH'], ENV['BUNDLE_GEMFILE'], ENV['RUBYOPT'] = bundle_bin_path, bundle_gemfile, rubyopt + Bundler.with_clean_env do + print `"#{Gem.ruby}" "#{_bundle_command}" #{command}` + end end def run_bundle -- cgit v1.2.3