Skip to content

Commit

Permalink
In app_generator, fix hardcoded bundle call to derive the bundle ex…
Browse files Browse the repository at this point in the history
…ecutable name from Thor::Util.ruby_command.

This ensures that eg. when `rails` is called from `ruby1.9`, `bundle1.9` is called.
  • Loading branch information
kch committed Feb 26, 2010
1 parent 6bc24d4 commit d38a5b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion railties/lib/generators/rails/app/app_generator.rb
Expand Up @@ -175,7 +175,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
Expand Down

0 comments on commit d38a5b1

Please sign in to comment.