Exception: Gem::UnsatisfiableDependencyError
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
DependencyError,
Exception,
RuntimeError
|
|
Instance Chain:
self,
DependencyError,
Exception,
RuntimeError
|
|
Inherits: |
Gem::DependencyError
|
Defined in: | lib/rubygems/exceptions.rb |
Overview
Raised by Resolver when a dependency requests a gem for which there is no spec.
Class Method Summary
-
.new(dep, platform_mismatch = nil) ⇒ UnsatisfiableDependencyError
constructor
Creates a new
UnsatisfiableDependencyError
for the unsatisfiable Resolver::DependencyRequestdep
Instance Attribute Summary
-
#errors
rw
Errors encountered which may have contributed to this exception.
-
#dependency
readonly
The unsatisfiable dependency.
Instance Method Summary
Constructor Details
.new(dep, platform_mismatch = nil) ⇒ UnsatisfiableDependencyError
Creates a new UnsatisfiableDependencyError
for the unsatisfiable Resolver::DependencyRequest dep
# File 'lib/rubygems/exceptions.rb', line 235
def initialize dep, platform_mismatch=nil if platform_mismatch and !platform_mismatch.empty? plats = platform_mismatch.map { |x| x.platform.to_s }.sort.uniq super "Unable to resolve dependency: No match for '#{dep}' on this platform. Found: #{plats.join(', ')}" else if dep.explicit? super "Unable to resolve dependency: user requested '#{dep}'" else super "Unable to resolve dependency: '#{dep.request_context}' requires '#{dep}'" end end @dependency = dep @errors = [] end
Instance Attribute Details
#dependency (readonly)
The unsatisfiable dependency. This is a Resolver::DependencyRequest, not a Dependency
# File 'lib/rubygems/exceptions.rb', line 224
attr_reader :dependency
#errors (rw)
Errors encountered which may have contributed to this exception
# File 'lib/rubygems/exceptions.rb', line 229
attr_accessor :errors
Instance Method Details
#name
The name of the unresolved dependency
# File 'lib/rubygems/exceptions.rb', line 254
def name @dependency.name end
#version
The Requirement of the unresolved dependency (not Version).
# File 'lib/rubygems/exceptions.rb', line 261
def version @dependency.requirement end