method
bundle_command
v7.2.3 -
Show latest stable
- Class:
Rails::Generators::AppBase
bundle_command(command, env = {})private
No documentation available.
# File railties/lib/rails/generators/app_base.rb, line 629
def bundle_command(command, env = {})
say_status :run, "bundle #{command}"
# We are going to shell out rather than invoking Bundler::CLI.new(command)
# because `rails new` loads the Thor gem and on the other hand bundler uses
# its own vendored Thor, which could be a different version. Running both
# things in the same process is a recipe for a night with paracetamol.
#
# Thanks to James Tucker for the Gem tricks involved in this call.
_bundle_command = Gem.bin_path("bundler", "bundle")
require "bundler"
Bundler.with_original_env do
exec_bundle_command(_bundle_command, command, env)
end
end