Permalink
Browse files

Run gem install as external command. [#210 state:resolved]

  • Loading branch information...
1 parent 2243ffd commit fb89d7fa6d21a4b0faab753ff3a7c934d9d59883 @seven1m seven1m committed with technoweenie May 16, 2008
Showing with 5 additions and 1 deletion.
  1. +5 −1 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

0 comments on commit fb89d7f

Please sign in to comment.