Exception: Gem::MissingSpecVersionError

Inherits:
MissingSpecError show all
Defined in:
lib/rubygems/errors.rb

Overview

Raised when trying to activate a gem, and the gem exists on the system, but not the requested version. Instead of rescuing from this class, make sure to rescue from the superclass Gem::LoadError to catch all types of load errors.

Instance Attribute Summary collapse

Attributes inherited from LoadError

#name, #requirement

Instance Method Summary collapse

Methods inherited from MissingSpecError

#message

Constructor Details

#initialize(name, requirement, specs) ⇒ MissingSpecVersionError

Returns a new instance of MissingSpecVersionError.



54
55
56
57
# File 'lib/rubygems/errors.rb', line 54

def initialize(name, requirement, specs)
  super(name, requirement)
  @specs = specs
end

Instance Attribute Details

#specsObject (readonly)

Returns the value of attribute specs.



52
53
54
# File 'lib/rubygems/errors.rb', line 52

def specs
  @specs
end