{"record":{"id":"9ed2207ed49f4350","repo":"ruby/rubygems","slug":"could-not-find-name-requirement-did-fi","errorCode":null,"errorMessage":"Could not find '#{name}' (#{requirement}) - did find: [#{names.join \",\"}]\nChecked in 'GEM_PATH=#{Gem.path.join(File::PATH_SEPARATOR)}' #{@extra_message}, execute `gem env` for more information","messagePattern":"Could not find '#(.+?)' \\(#(.+?)\\) - did find: \\[#(.+?)\\]\nChecked in 'GEM_PATH=#(.+?)' #(.+?), execute `gem env` for more information","errorType":"exception","errorClass":"Gem::MissingSpecVersionError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/dependency.rb","lineNumber":303,"sourceCode":"  ##\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\n      pre, matches = matches.partition {|spec| spec.version.prerelease? }\n      matches = pre if matches.empty?","sourceCodeStart":285,"sourceCodeEnd":321,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/dependency.rb#L285-L321","documentation":"Error \"Could not find '#{name}' (#{requirement}) - did find: [#{names.join \",\"}]\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:303 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"}