{"record":{"id":"4200032ff15206e0","repo":"ruby/rubygems","slug":"5","errorCode":"5","errorMessage":"#{spec.full_name} requires ruby version #{spec.required_ruby_version}, which is incompatible with the current version, #{Gem.ruby_version}","messagePattern":"#(.+?) requires ruby version #(.+?), which is incompatible with the current version, #(.+?)","errorType":"exception","errorClass":"Bundler::InstallError","httpStatus":null,"severity":"error","filePath":"lib/bundler/installer.rb","lineNumber":234,"sourceCode":"    def load_plugins\n      Gem.load_plugins\n\n      requested_path_gems = @definition.specs.select {|s| s.source.is_a?(Source::Path) }\n      path_plugin_files = requested_path_gems.flat_map do |spec|\n        spec.matches_for_glob(\"rubygems_plugin#{Bundler.rubygems.suffix_pattern}\")\n      rescue TypeError\n        error_message = \"#{spec.name} #{spec.version} has an invalid gemspec\"\n        raise Gem::InvalidSpecificationException, error_message\n      end\n      Gem.load_plugin_files(path_plugin_files)\n      Gem.load_env_plugins\n    end\n\n    def ensure_specs_are_compatible!\n      overrides = @definition.overrides\n      @definition.specs.each do |spec|\n        unless spec.matches_current_ruby_with_overrides?(overrides)\n          raise InstallError, incompatibility_message(spec, \"requires ruby version #{spec.required_ruby_version}, \" \\\n            \"which is incompatible with the current version, #{Gem.ruby_version}\")\n        end\n        unless spec.matches_current_rubygems_with_overrides?(overrides)\n          raise InstallError, incompatibility_message(spec, \"requires rubygems version #{spec.required_rubygems_version}, \" \\\n            \"which is incompatible with the current version, #{Gem.rubygems_version}\")\n        end\n      end\n    end\n\n    # Build the error raised when a locked spec can't run on the current Ruby or\n    # RubyGems. When the offending spec is a platform-specific variant locked in\n    # frozen mode, point users at the fix: re-resolving outside frozen mode adds\n    # the Ruby (non platform-specific) fallback variant to the lockfile.\n    def incompatibility_message(spec, reason)\n      message = \"#{spec.full_name} #{reason}\"\n      return message unless Bundler.frozen_bundle? && spec.platform != Gem::Platform::RUBY\n\n      message + \"\\n\\nThe lockfile only includes the #{spec.platform} variant of #{spec.name}. \" \\","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/installer.rb#L216-L252","documentation":"Error \"#{spec.full_name} requires ruby version #{spec.required_ruby_version}, which is incompatible with the current version, #{Gem.ruby_version}\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/installer.rb:234 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"}