{"record":{"id":"b698005dab868eb7","repo":"ruby/rubygems","slug":"39","errorCode":"39","errorMessage":"The running version of Bundler (#{Bundler::VERSION}) does not match the version of the specification installed for it (#{@loaded_spec.version}). This can be caused by reinstalling Ruby without removing previous installation, leaving around an upgraded default version of Bundler. Reinstalling Ruby from scratch should fix the problem.","messagePattern":"The running version of Bundler \\(#(.+?)\\) does not match the version of the specification installed for it \\(#(.+?)\\)\\. This can be caused by reinstalling Ruby without removing previous installation, leaving around an upgraded default version of Bundler\\. Reinstalling Ruby from scratch should fix the problem\\.","errorType":"exception","errorClass":"Bundler::CorruptBundlerInstallError","httpStatus":null,"severity":"error","filePath":"lib/bundler/source/metadata.rb","lineNumber":14,"sourceCode":"# frozen_string_literal: true\n\nmodule Bundler\n  class Source\n    class Metadata < Source\n      def specs\n        @specs ||= Index.build do |idx|\n          idx << Gem::Specification.new(\"Ruby\\0\", Bundler::RubyVersion.system.gem_version)\n          idx << Gem::Specification.new(\"RubyGems\\0\", Gem::VERSION) do |s|\n            s.required_rubygems_version = Gem::Requirement.default\n          end\n\n          if local_spec = Gem.loaded_specs[\"bundler\"]\n            raise CorruptBundlerInstallError.new(local_spec) if local_spec.version.to_s != Bundler::VERSION\n\n            idx << local_spec\n          else\n            idx << Gem::Specification.new do |s|\n              s.name     = \"bundler\"\n              s.version  = VERSION\n              s.license  = \"MIT\"\n              s.platform = Gem::Platform::RUBY\n              s.authors  = [\"bundler team\"]\n              s.bindir   = \"exe\"\n              s.homepage = \"https://bundler.io\"\n              s.summary  = \"The best way to manage your application's dependencies\"\n              s.executables = %w[bundle bundler]\n              s.loaded_from = SharedHelpers.gemspec_path\n            end\n          end\n\n          idx.each {|s| s.source = self }","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/source/metadata.rb#L1-L32","documentation":"Error \"The running version of Bundler (#{Bundler::VERSION}) does not match the version of the specification installed for it (#{@loaded_spec.version}). This can be caused by reinstalling Ruby without removing previous installation, leaving around an upgraded default version of Bundler. Reinstalling Ruby from scratch should fix the problem.\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/source/metadata.rb:14 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"}