method
install_gem_without_dependencies
v2_1_10 -
Show latest stable
- Class:
Gem::Commands::InstallCommand
install_gem_without_dependencies(name, req)public
No documentation available.
# File lib/rubygems/commands/install_command.rb, line 228
def install_gem_without_dependencies name, req # :nodoc:
gem = nil
if local? then
if name =~ /\.gem$/ and File.file? name then
source = Gem::Source::SpecificFile.new name
spec = source.spec
else
source = Gem::Source::Local.new
spec = source.find_gem name, req
end
gem = source.download spec if spec
end
if remote? and not gem then
dependency = Gem::Dependency.new name, req
dependency.prerelease = options[:prerelease]
fetcher = Gem::RemoteFetcher.fetcher
gem = fetcher.download_to_cache dependency
end
inst = Gem::Installer.new gem, options
inst.install
@installed_specs.push(inst.spec)
end