aboutsummaryrefslogtreecommitdiffstats
path: root/railties
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-03 10:12:42 +0100
commit6f4c45199b791ac2c90aa6742f8ffbd62b02ed7b (patch)
treefce28388e3b6d895671d141950ad1026840b03e0 /railties
parent70b849546871610513bf587ecb7aebcaa8e20773 (diff)
downloadrails-6f4c45199b791ac2c90aa6742f8ffbd62b02ed7b.tar.gz
rails-6f4c45199b791ac2c90aa6742f8ffbd62b02ed7b.tar.bz2
rails-6f4c45199b791ac2c90aa6742f8ffbd62b02ed7b.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')
-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 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