Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

prevent using already loaded Gemfile for 'bundle install', fix #6314

  • Loading branch information...
commit aed906af97cfa86801951a6a97251084fac6dc57 1 parent 3bc73df
@mpapis mpapis authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 railties/lib/rails/generators/app_base.rb
View
8 railties/lib/rails/generators/app_base.rb
@@ -246,8 +246,16 @@ def bundle_command(command)
# is easier to silence stdout in the existing test suite this way. The
# end-user gets the bundler commands called anyway, so no big deal.
#
+ # We unset temporary bundler variables to load proper bundler and Gemfile.
+ #
# Thanks to James Tucker for the Gem tricks involved in this call.
+
+ bundle_gemfile, rubyopt = ENV['BUNDLE_GEMFILE'], ENV['RUBYOPT']
+ ENV['BUNDLE_GEMFILE'], ENV['RUBYOPT'] = "", ""
+
print `"#{Gem.ruby}" "#{Gem.bin_path('bundler', 'bundle')}" #{command}`
+
+ ENV['BUNDLE_GEMFILE'], ENV['RUBYOPT'] = bundle_gemfile, rubyopt
end
def run_bundle
Please sign in to comment.
Something went wrong with that request. Please try again.