diff options
author | Michal Papis <mpapis@gmail.com> | 2012-05-15 23:39:19 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-05-15 22:31:08 -0700 |
commit | 5904295b2327f512657a5c44503675807c45ee37 (patch) | |
tree | 4e23508860ec53f3155f3b958be8e2707e53fa85 /railties/lib/rails/generators | |
parent | 57d534ee9e441d078fcc161c0c78ebaa5aacd736 (diff) | |
download | rails-5904295b2327f512657a5c44503675807c45ee37.tar.gz rails-5904295b2327f512657a5c44503675807c45ee37.tar.bz2 rails-5904295b2327f512657a5c44503675807c45ee37.zip |
improve #6318
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index d661c62148..10ad475d55 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -249,13 +249,14 @@ module Rails # We unset temporary bundler variables to load proper bundler and Gemfile. # # Thanks to James Tucker for the Gem tricks involved in this call. + _bundle_command = Gem.bin_path('bundler', 'bundle') - bundle_gemfile, rubyopt = ENV['BUNDLE_GEMFILE'], ENV['RUBYOPT'] - ENV['BUNDLE_GEMFILE'], ENV['RUBYOPT'] = "", "" + 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}" "#{Gem.bin_path('bundler', 'bundle')}" #{command}` + print `"#{Gem.ruby}" "#{_bundle_command}" #{command}` - ENV['BUNDLE_GEMFILE'], ENV['RUBYOPT'] = bundle_gemfile, rubyopt + ENV['BUNDLE_BIN_PATH'], ENV['BUNDLE_GEMFILE'], ENV['RUBYOPT'] = bundle_bin_path, bundle_gemfile, rubyopt end def run_bundle |