Exception: Gem::UnsatisfiableDependencyError
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
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 unsatisfiableResolver::DependencyRequest
dep
Deprecate
- Extended
deprecate | Simple deprecation method that deprecates #name by wrapping it up in a dummy method. |
skip_during | Temporarily turn off warnings. |
Instance Attribute Summary
-
#dependency
readonly
The unsatisfiable dependency.
-
#errors
rw
Errors encountered which may have contributed to this exception.
Exception
- Inherited
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 252
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 241
attr_reader :dependency
#errors (rw)
Errors encountered which may have contributed to this exception
# File 'lib/rubygems/exceptions.rb', line 246
attr_accessor :errors
Instance Method Details
#name
The name of the unresolved dependency
# File 'lib/rubygems/exceptions.rb', line 271
def name @dependency.name end
#version
The Requirement of the unresolved dependency (not Version
).
# File 'lib/rubygems/exceptions.rb', line 278
def version @dependency.requirement end