class Gem::SpecificGemNotFoundException - Documentation for Ruby 4.0
Description: Documentation for the Gem::SpecificGemNotFoundException class
Keywords: ruby,class,Gem::SpecificGemNotFoundException

🔍

No recent searches

# class Gem::SpecificGemNotFoundException

### Attributes

errors [R]

Errors encountered attempting to find the gem.

name [R]

The name of the gem that could not be found.

version [R]

The version of the gem that could not be found.

### Public Class Methods

new (name, version, errors = nil)
Source

    # File lib/rubygems/exceptions.rb, line 103
    def initialize(name, version, errors = nil)
      super "Could not find a valid gem '#{name}' (#{version}) locally or in a repository"

      @name = name
      @version = version
      @errors = errors
    end

Creates a new `SpecificGemNotFoundException` for a gem with the given `name` and `version`. Any `errors` encountered when attempting to find the gem are also stored.

Calls superclass method `Exception::new`