Skip to content

Commit 9a97772

Browse files
committed
In app_generator fix hardcoded bundle call to derive the bundle executable name from ruby_install_name.
This ensures that eg. when `rails` is called from `ruby1.9`, `bundle1.9` is called. Calling just `bundle` would use the ruby 1.8 bundle.
1 parent 6bc24d4 commit 9a97772

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

railties/lib/generators/rails/app/app_generator.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ def apply_rails_template
175175
end
176176

177177
def bundle_if_dev_or_edge
178-
run "bundle install" if dev_or_edge?
178+
require 'rbconfig'
179+
bundle_bin = RbConfig::CONFIG['ruby_install_name'].sub('ruby', 'bundle')
180+
run "#{bundle_bin} install" if dev_or_edge?
179181
end
180182

181183
protected

0 commit comments

Comments
 (0)