aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/app_base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/generators/app_base.rb')
-rw-r--r--railties/lib/rails/generators/app_base.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index 5838c9fc38..d69afcd2cb 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -140,14 +140,14 @@ module Rails
gem 'rails', path: '#{Rails::Generators::RAILS_DEV_PATH}'
gem 'journey', github: 'rails/journey'
gem 'arel', github: 'rails/arel'
- gem 'active_record_deprecated_finders', github: 'rails/active_record_deprecated_finders'
+ gem 'activerecord-deprecated_finders', github: 'rails/activerecord-deprecated_finders'
GEMFILE
elsif options.edge?
<<-GEMFILE.strip_heredoc
gem 'rails', github: 'rails/rails'
gem 'journey', github: 'rails/journey'
gem 'arel', github: 'rails/arel'
- gem 'active_record_deprecated_finders', github: 'rails/active_record_deprecated_finders'
+ gem 'activerecord-deprecated_finders', github: 'rails/activerecord-deprecated_finders'
GEMFILE
else
<<-GEMFILE.strip_heredoc
@@ -246,8 +246,15 @@ module Rails
# 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.
- print `"#{Gem.ruby}" "#{Gem.bin_path('bundler', 'bundle')}" #{command}`
+ _bundle_command = Gem.bin_path('bundler', 'bundle')
+
+ require 'bundler'
+ Bundler.with_clean_env do
+ print `"#{Gem.ruby}" "#{_bundle_command}" #{command}`
+ end
end
def run_bundle