{"record":{"id":"5cb61c31efea4c99","repo":"ruby/rubygems","slug":"the-source-must-be-an-absolute-uri-for-example-s","errorCode":null,"errorMessage":"The source must be an absolute URI. For example:\nsource 'https://rubygems.org'","messagePattern":"The source must be an absolute URI\\. For example:\nsource 'https://rubygems\\.org'","errorType":"validation","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/bundler/source/rubygems.rb","lineNumber":373,"sourceCode":"      end\n\n      def cached_gem(spec)\n        global_cache_path = download_cache_path(spec)\n        caches << global_cache_path if global_cache_path\n\n        possibilities = caches.map {|p| package_path(p, spec) }\n        possibilities.find {|p| File.exist?(p) }\n      end\n\n      def package_path(cache_path, spec)\n        \"#{cache_path}/#{spec.file_name}\"\n      end\n\n      def normalize_uri(uri)\n        uri = URINormalizer.normalize_suffix(uri.to_s)\n        require_relative \"../vendored_uri\"\n        uri = Gem::URI(uri)\n        raise ArgumentError, \"The source must be an absolute URI. For example:\\n\" \\\n          \"source 'https://rubygems.org'\" if !uri.absolute? || (uri.is_a?(Gem::URI::HTTP) && uri.host.nil?)\n        uri\n      end\n\n      def remove_auth(remote)\n        if remote.user || remote.password\n          remote.dup.tap {|uri| uri.user = uri.password = nil }.to_s\n        else\n          remote.to_s\n        end\n      end\n\n      def installed_specs\n        @installed_specs ||= Index.build do |idx|\n          Bundler.rubygems.installed_specs.reverse_each do |spec|\n            spec.source = self\n            next if spec.ignored?\n            idx << spec","sourceCodeStart":355,"sourceCodeEnd":391,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/source/rubygems.rb#L355-L391","documentation":"Error \"The source must be an absolute URI. For example:\nsource 'https://rubygems.org'\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/source/rubygems.rb:373 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"}