class Gem::MissingSpecVersionError

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.

Attributes

specs[R]

Public Class Methods

new(name, requirement, specs) click to toggle source
Calls superclass method Gem::MissingSpecError::new
# File lib/rubygems/errors.rb, line 55
def initialize(name, requirement, specs)
  super(name, requirement)
  @specs = specs
end

Private Instance Methods

build_message() click to toggle source
# File lib/rubygems/errors.rb, line 62
def build_message
  names = specs.map(&:full_name)
  "Could not find '#{name}' (#{requirement}) - did find: [#{names.join ","}]\n"
end