From 6f4c45199b791ac2c90aa6742f8ffbd62b02ed7b Mon Sep 17 00:00:00 2001 From: Caio Chassot Date: Mon, 22 Feb 2010 04:09:51 -0300 Subject: In app_generator, fix hardcoded `bundle` call to derive the bundle executable name from Thor::Util.ruby_command. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ensures that eg. when `rails` is called from `ruby1.9`, `bundle1.9` is called. Signed-off-by: José Valim --- railties/lib/generators/rails/app/app_generator.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'railties/lib/generators/rails') diff --git a/railties/lib/generators/rails/app/app_generator.rb b/railties/lib/generators/rails/app/app_generator.rb index 92e0d37436..ccc840f81c 100644 --- a/railties/lib/generators/rails/app/app_generator.rb +++ b/railties/lib/generators/rails/app/app_generator.rb @@ -178,7 +178,8 @@ module Rails::Generators end def bundle_if_dev_or_edge - run "bundle install" if dev_or_edge? + bundle_command = Thor::Util.ruby_command.sub(%r[ruby(?=[^/]*$)], 'bundle') + run "#{bundle_command} install" if dev_or_edge? end protected -- cgit v1.2.3