mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Run gem install as external command. [#210 state:resolved]
This commit is contained in:
parent
2243ffd1ff
commit
fb89d7fa6d
1 changed files with 5 additions and 1 deletions
|
@ -73,7 +73,7 @@ module Rails
|
|||
end
|
||||
|
||||
def install
|
||||
Gem::GemRunner.new.run(install_command)
|
||||
puts `#{gem_command} #{install_command.join(' ')}`
|
||||
end
|
||||
|
||||
def unpack_to(directory)
|
||||
|
@ -100,6 +100,10 @@ private ###################################################################
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue