{"record":{"id":"3519a2a1945ef603","repo":"ruby/rubygems","slug":"spec-has-an-invalid-dependencies","errorCode":null,"errorMessage":"#{spec} has an invalid dependencies","messagePattern":"#(.+?) has an invalid dependencies","errorType":"exception","errorClass":"Gem::InstallError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/installer.rb","lineNumber":709,"sourceCode":"\n    if spec.raw_require_paths.any? {|path| path =~ /\\R/ }\n      raise Gem::InstallError, \"#{spec} has an invalid require_paths\"\n    end\n\n    if spec.extensions.any? {|ext| ext =~ /\\R/ }\n      raise Gem::InstallError, \"#{spec} has an invalid extensions\"\n    end\n\n    unless /\\A[\\w.-]+\\z/.match?(spec.platform.to_s)\n      raise Gem::InstallError, \"#{spec.platform} is an invalid platform\"\n    end\n\n    unless /\\A\\d+\\z/.match?(spec.specification_version.to_s)\n      raise Gem::InstallError, \"#{spec} has an invalid specification_version\"\n    end\n\n    if spec.dependencies.any? {|dep| dep.type != :runtime && dep.type != :development }\n      raise Gem::InstallError, \"#{spec} has an invalid dependencies\"\n    end\n\n    if spec.dependencies.any? {|dep| dep.name =~ /(?:\\R|[<>])/ }\n      raise Gem::InstallError, \"#{spec} has an invalid dependencies\"\n    end\n\n    if spec.executables.any? {|name| !name.is_a?(String) || name != File.basename(name) || /\\A\\.\\.?\\z|\\R/.match?(name) }\n      raise Gem::InstallError, \"#{spec} has an invalid executable\"\n    end\n\n    raise Gem::InstallError, \"#{spec} has an invalid bindir\" unless spec.bindir.is_a?(String)\n\n    expanded_gem_dir = File.expand_path(gem_dir)\n    expanded_bindir = File.expand_path(File.join(gem_dir, spec.bindir))\n    unless expanded_bindir == expanded_gem_dir || expanded_bindir.start_with?(\"#{expanded_gem_dir}/\")\n      raise Gem::InstallError, \"#{spec} has an invalid bindir\"\n    end\n  end","sourceCodeStart":691,"sourceCodeEnd":727,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/installer.rb#L691-L727","documentation":"Error \"#{spec} has an invalid dependencies\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/installer.rb:709 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix `spec.add_dependency`/`add_runtime_dependency` calls: valid gem name plus valid version requirement"],"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"}