Skip to content

Commit

Permalink
Run gem install as external command. [#210 state:resolved]
Browse files Browse the repository at this point in the history
  • Loading branch information
seven1m authored and technoweenie committed May 31, 2008
1 parent 2243ffd commit fb89d7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion railties/lib/rails/gem_dependency.rb
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit fb89d7f

Please sign in to comment.