{"record":{"id":"b264524e1961f535","repo":"ruby/rubygems","slug":"unable-to-find-reference-reference-in-repos","errorCode":null,"errorMessage":"unable to find reference #{@reference} in #{@repository}","messagePattern":"unable to find reference #(.+?) in #(.+?)","errorType":"exception","errorClass":"Gem::Exception","httpStatus":null,"severity":"error","filePath":"lib/rubygems/source/git.rb","lineNumber":191,"sourceCode":"\n  ##\n  # The directory where the git gem's repository will be cached.\n\n  def repo_cache_dir # :nodoc:\n    File.join @root_dir, \"cache\", \"bundler\", \"git\", \"#{@name}-#{uri_hash}\"\n  end\n\n  ##\n  # Converts the git reference for the repository into a commit hash.\n\n  def rev_parse # :nodoc:\n    hash = nil\n\n    Dir.chdir repo_cache_dir do\n      hash = Gem::Util.popen(git_command, \"rev-parse\", @reference).strip\n    end\n\n    raise Gem::Exception,\n          \"unable to find reference #{@reference} in #{@repository}\" unless\n            $?.success?\n\n    hash\n  end\n\n  ##\n  # Loads all gemspecs in the repository\n\n  def specs\n    checkout\n\n    return [] unless install_dir\n\n    Dir.chdir install_dir do\n      Dir[\"{,*,*/*}.gemspec\"].filter_map do |spec_file|\n        directory = File.dirname spec_file\n        file      = File.basename spec_file","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/source/git.rb#L173-L209","documentation":"Error \"unable to find reference #{@reference} in #{@repository}\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/source/git.rb:191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the branch/tag/reference exists in the git repository","Run `gem sources`/`bundle config` to verify the repo URL, and fetch the reference"],"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"}