class method
Gem::UnsatisfiableDependencyError.new
new(dep, platform_mismatch = nil)
lib/rubygems/exceptions.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/rubygems/exceptions.rb, line 254
def initialize(dep, platform_mismatch = nil)
if platform_mismatch && !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
Creates a new UnsatisfiableDependencyError for the unsatisfiable Gem::Resolver::DependencyRequest dep