Permalink
Browse files

In app_generator, fix hardcoded `bundle` call to derive the bundle ex…

…ecutable 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>
  • Loading branch information...
1 parent 70b8495 commit 6f4c45199b791ac2c90aa6742f8ffbd62b02ed7b @kch kch committed with josevalim Feb 22, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 railties/lib/generators/rails/app/app_generator.rb
@@ -178,7 +178,8 @@ def apply_rails_template
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

1 comment on commit 6f4c451

Member

sikachu commented on 6f4c451 Mar 4, 2010

This commit has been reverted by this commit: 7979da2

Please sign in to comment.