diff --git a/railties/lib/rails/gem_dependency.rb b/railties/lib/rails/gem_dependency.rb index 2034841cd2dac..582861abf427b 100644 --- a/railties/lib/rails/gem_dependency.rb +++ b/railties/lib/rails/gem_dependency.rb @@ -73,7 +73,7 @@ def load_paths_added? end def install - Gem::GemRunner.new.run(install_command) + puts `#{gem_command} #{install_command.join(' ')}` end def unpack_to(directory) @@ -100,6 +100,10 @@ def ==(other) def specification @spec ||= Gem.source_index.search(Gem::Dependency.new(@name, @requirement)).sort_by { |s| s.version }.last end + + def gem_command + RUBY_PLATFORM =~ /win32/ ? 'gem.bat' : 'gem' + end def install_command cmd = %w(install) << @name