class Gem::Commands::InstallCommand

def install_gem name, version # :nodoc:

:nodoc:
def install_gem name, version # :nodoc:
  return if options[:conservative] and
    not Gem::Dependency.new(name, version).matching_specs.empty?
  req = Gem::Requirement.create(version)
  if options[:ignore_dependencies] then
    install_gem_without_dependencies name, req
  else
    inst = Gem::DependencyInstaller.new options
    request_set = inst.resolve_dependencies name, req
    if options[:explain]
      puts "Gems to install:"
      request_set.sorted_requests.each do |s|
        puts "  #{s.full_name}"
      end
      return
    else
      @installed_specs.concat request_set.install options
    end
    show_install_errors inst.errors
  end
end