{"record":{"id":"66837c7115b8eec6","repo":"ruby/rubygems","slug":"path-found-in-multiple-gems-names-join","errorCode":null,"errorMessage":"#{path} found in multiple gems: #{names.join \", \"}","messagePattern":"#(.+?) found in multiple gems: #(.+?)","errorType":"exception","errorClass":"Gem::LoadError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/core_ext/kernel_require.rb","lineNumber":121,"sourceCode":"      # If a and b are currently active with c being unresolved and d.rb is\n      # requested, then find_in_unresolved_tree will find d.rb in d because\n      # it's a dependency of c.\n      #\n      if found_specs.empty?\n        found_specs = Gem::Specification.find_in_unresolved_tree path\n\n        found_specs.each(&:activate)\n\n      # We found +path+ directly in an unresolved gem. Now we figure out, of\n      # the possible found specs, which one we should activate.\n      else\n\n        # Check that all the found specs are just different\n        # versions of the same gem\n        names = found_specs.map(&:name).uniq\n\n        if names.size > 1\n          raise Gem::LoadError, \"#{path} found in multiple gems: #{names.join \", \"}\"\n        end\n\n        # Ok, now find a gem that has no conflicts, starting\n        # at the highest version.\n        valid = found_specs.find {|s| !s.has_conflicts? }\n\n        unless valid\n          le = Gem::LoadError.new \"unable to find a version of '#{names.first}' to activate\"\n          le.name = names.first\n          raise le\n        end\n\n        valid.activate\n      end\n    end\n\n    begin\n      gem_original_require(path)","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/core_ext/kernel_require.rb#L103-L139","documentation":"Error \"#{path} found in multiple gems: #{names.join \", \"}\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/core_ext/kernel_require.rb:121 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"}