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 234
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 223
attr_reader :dependency
#errors (rw)
Errors encountered which may have contributed to this exception
# File 'lib/rubygems/exceptions.rb', line 228
attr_accessor :errors
Instance Method Details
#name
The name of the unresolved dependency
# File 'lib/rubygems/exceptions.rb', line 253
def name @dependency.name end
#version
The Requirement of the unresolved dependency (not Version).
# File 'lib/rubygems/exceptions.rb', line 260
def version @dependency.requirement end