aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorCaio Chassot <dev@caiochassot.com>2010-02-22 04:09:51 -0300
committerJosé Valim <jose.valim@gmail.com>2010-03-12 21:33:39 +0100
commit94a60a5600269a9ce63eb8991c4deaa26cd0a7b6 (patch)
treeb6ec5d8e2244783f50995507aa40cb47132a300f /railties/lib
parent9268b598bb20523e1b886f8811598647ce427ef9 (diff)
downloadrails-94a60a5600269a9ce63eb8991c4deaa26cd0a7b6.tar.gz
rails-94a60a5600269a9ce63eb8991c4deaa26cd0a7b6.tar.bz2
rails-94a60a5600269a9ce63eb8991c4deaa26cd0a7b6.zip
In app_generator, fix hardcoded `bundle` call to derive the bundle executable name from Thor::Util.ruby_command.
This ensures that eg. when `rails` is called from `ruby1.9`, `bundle1.9` is called. Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/generators/rails/app/app_generator.rb3
1 files changed, 2 insertions, 1 deletions
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