Exception: Gem::ConflictError
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
LoadError ,
LoadError
|
|
Instance Chain:
self,
LoadError ,
LoadError
|
|
Inherits: |
Gem::LoadError
|
Defined in: | lib/rubygems/errors.rb |
Overview
Raised when there are conflicting gem specs loaded
Class Method Summary
- .new(target, conflicts) ⇒ ConflictError constructor
Instance Attribute Summary
-
#conflicts
readonly
A Hash mapping conflicting specifications to the dependencies that caused the conflict.
-
#target
readonly
The specification that had the conflict.
LoadError
- Inherited
#name | Name of gem. |
#requirement |
|
Constructor Details
.new(target, conflicts) ⇒ ConflictError
# File 'lib/rubygems/errors.rb', line 84
def initialize(target, conflicts) @target = target @conflicts = conflicts @name = target.name reason = conflicts.map { |act, dependencies| "#{act.full_name} conflicts with #{dependencies.join(", ")}" }.join ", " # TODO: improve message by saying who activated `con` super("Unable to activate #{target.full_name}, because #{reason}") end
Instance Attribute Details
#conflicts (readonly)
A Hash mapping conflicting specifications to the dependencies that caused the conflict
# File 'lib/rubygems/errors.rb', line 77
attr_reader :conflicts
#target (readonly)
The specification that had the conflict
# File 'lib/rubygems/errors.rb', line 82
attr_reader :target