From 94a60a5600269a9ce63eb8991c4deaa26cd0a7b6 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 888e3b2ddd..1e1acc1141 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 = File.basename(Thor::Util.ruby_command).sub(/ruby/, 'bundle') + run "#{bundle_command} install" if dev_or_edge? end protected -- cgit v1.2.3