{"record":{"id":"23eb46cc6552d542","repo":"ruby/rubygems","slug":"could-not-find-name-requirement-among","errorCode":null,"errorMessage":"Could not find '#{name}' (#{requirement}) among #{total} total gem(s)\nChecked in 'GEM_PATH=#{Gem.path.join(File::PATH_SEPARATOR)}' #{@extra_message}, execute `gem env` for more information","messagePattern":"Could not find '#(.+?)' \\(#(.+?)\\) among #(.+?) total gem\\(s\\)\nChecked in 'GEM_PATH=#(.+?)' #(.+?), execute `gem env` for more information","errorType":"exception","errorClass":"Gem::MissingSpecError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/dependency.rb","lineNumber":301,"sourceCode":"  end\n\n  ##\n  # True if the dependency will not always match the latest version.\n\n  def specific?\n    @requirement.specific?\n  end\n\n  def to_specs\n    matches = matching_specs true\n\n    # TODO: check Gem.activated_spec[self.name] in case matches falls outside\n\n    if matches.empty?\n      specs = Gem::Specification.stubs_for name\n\n      if specs.empty?\n        raise Gem::MissingSpecError.new name, requirement\n      else\n        raise Gem::MissingSpecVersionError.new name, requirement, specs\n      end\n    end\n\n    # TODO: any other resolver validations should go here\n\n    matches\n  end\n\n  def to_spec\n    matches = to_specs.compact\n\n    active = matches.find(&:activated?)\n    return active if active\n\n    unless prerelease?\n      # Consider prereleases only as a fallback","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/dependency.rb#L283-L319","documentation":"Error \"Could not find '#{name}' (#{requirement}) among #{total} total gem(s)\nChecked in 'GEM_PATH=#{Gem.path.join(File::PATH_SEPARATOR)}' #{@extra_message}, execute `gem env` for more information\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/dependency.rb:301 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}