diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 3b0791a453..a0a0f9ef66 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -185,14 +185,11 @@ module Rails end def bundle_command(command) - say_status :run, "bundle #{command}" + require 'bundler' + require 'bundler/cli' - # We use backticks and #print here instead of vanilla #system because it - # is easier to silence stdout in the existing test suite this way. The - # end-user gets the bundler commands called anyway. - # - # Thanks to James Tucker for the Gem tricks involved in this call. - print `"#{Gem.ruby}" -rubygems "#{Gem.bin_path('bundler', 'bundle')}" #{command}` + say_status :run, "bundle #{command}" + Bundler::CLI.new.send(command) end def run_bundle |