{"record":{"id":"a758e75e515287e0","repo":"ruby/rubygems","slug":"spec-has-an-invalid-require-paths","errorCode":null,"errorMessage":"#{spec} has an invalid require_paths","messagePattern":"#(.+?) has an invalid require_paths","errorType":"exception","errorClass":"Gem::InstallError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/installer.rb","lineNumber":693,"sourceCode":"\n    unless path.include? user_bin_dir\n      unless !Gem.win_platform? && (path.include? user_bin_dir.sub(ENV[\"HOME\"], \"~\"))\n        alert_warning \"You don't have #{user_bin_dir} in your PATH,\\n\\t  gem executables (#{executables.join(\", \")}) will not run.\"\n      end\n    end\n  end\n\n  def verify_gem_home # :nodoc:\n    FileUtils.mkdir_p gem_home, mode: options[:dir_mode] && 0o755\n  end\n\n  def verify_spec\n    unless Gem::Specification::VALID_NAME_PATTERN.match?(spec.name)\n      raise Gem::InstallError, \"#{spec} has an invalid name\"\n    end\n\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","sourceCodeStart":675,"sourceCodeEnd":711,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/installer.rb#L675-L711","documentation":"Error \"#{spec} has an invalid require_paths\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/installer.rb:693 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set `spec.require_paths` to an array of existing directories (default: ['lib'])"],"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"}