ruby/rubygems · error · Gem::MissingSpecVersionError

Could not find '#{name}' (#{requirement}) - did find: [#{nam

Error message

Could not find '#{name}' (#{requirement}) - did find: [#{names.join ","}]
Checked in 'GEM_PATH=#{Gem.path.join(File::PATH_SEPARATOR)}' #{@extra_message}, execute `gem env` for more information

What it means

Error "Could not find '#{name}' (#{requirement}) - did find: [#{names.join ","}] Checked in 'GEM_PATH=#{Gem.path.join(File::PATH_SEPARATOR)}' #{@extra_message}, execute `gem env` for more information" thrown in ruby/rubygems.

Source

Thrown at lib/rubygems/dependency.rb:303

  ##
  # True if the dependency will not always match the latest version.

  def specific?
    @requirement.specific?
  end

  def to_specs
    matches = matching_specs true

    # TODO: check Gem.activated_spec[self.name] in case matches falls outside

    if matches.empty?
      specs = Gem::Specification.stubs_for name

      if specs.empty?
        raise Gem::MissingSpecError.new name, requirement
      else
        raise Gem::MissingSpecVersionError.new name, requirement, specs
      end
    end

    # TODO: any other resolver validations should go here

    matches
  end

  def to_spec
    matches = to_specs.compact

    active = matches.find(&:activated?)
    return active if active

    unless prerelease?
      # Consider prereleases only as a fallback
      pre, matches = matches.partition {|spec| spec.version.prerelease? }
      matches = pre if matches.empty?

View on GitHub (pinned to 86cbb817a3)

When it happens

Trigger: Thrown at lib/rubygems/dependency.rb:303 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruby/rubygems@86cbb817a3 (2026-08-23). Data as JSON: /api/errors/9ed2207ed49f4350. Report an issue: GitHub.