From 06c05023f42cb7058afbd5e9b02c0e1ab0cd3ff3 Mon Sep 17 00:00:00 2001 From: Dominic Sisneros Date: Wed, 19 May 2010 13:06:31 -0600 Subject: [PATCH] fix app_generator bundle_command for windows --- .../rails/generators/rails/app/app_generator.rb | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index ee44acc..f18ceb6 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -4,6 +4,9 @@ require 'rails/version' unless defined?(Rails::VERSION) require 'rbconfig' require 'open-uri' require 'uri' +require 'pathname' +require 'rake/alt_system' + module Rails module ActionMethods @@ -303,9 +306,11 @@ module Rails end def bundle_if_dev_or_edge - bundle_command = File.basename(Thor::Util.ruby_command).sub(/ruby/, 'bundle') + dir, ruby_command = Pathname.new(Thor::Util.ruby_command).split + bundle_command = Rake::AltSystem.find_runnable(dir + 'bundle') run "#{bundle_command} install" if dev_or_edge? end + protected -- 1.7.0.2.msysgit.0