{"record":{"id":"b53df3f7915d71d4","repo":"ruby/rubygems","slug":"unsupported-uri-scheme-source-uri-scheme","errorCode":null,"errorMessage":"unsupported URI scheme #{source_uri.scheme}","messagePattern":"unsupported URI scheme #(.+?)","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/remote_fetcher.rb","lineNumber":199,"sourceCode":"      source_path = if Gem.win_platform? && source_uri.scheme &&\n                       !source_uri.path.include?(\":\")\n        \"#{source_uri.scheme}:#{source_uri.path}\"\n      else\n        source_uri.path\n      end\n\n      source_path = Gem::UriFormatter.new(source_path).unescape\n\n      begin\n        FileUtils.cp source_path, local_gem_path unless\n          File.identical?(source_path, local_gem_path)\n      rescue Errno::EACCES\n        local_gem_path = source_uri.to_s\n      end\n\n      verbose \"Using local gem #{local_gem_path}\"\n    else\n      raise ArgumentError, \"unsupported URI scheme #{source_uri.scheme}\"\n    end\n\n    local_gem_path\n  end\n\n  ##\n  # File Fetcher. Dispatched by +fetch_path+. Use it instead.\n\n  def fetch_file(uri, *_)\n    Gem.read_binary Gem::Util.correct_for_windows_path uri.path\n  end\n\n  ##\n  # HTTP Fetcher. Dispatched by +fetch_path+. Use it instead.\n\n  def fetch_http(uri, last_modified = nil, head = false, depth = 0)\n    fetch_type = head ? Gem::Net::HTTP::Head : Gem::Net::HTTP::Get\n    response   = request uri, fetch_type, last_modified do |req|","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/remote_fetcher.rb#L181-L217","documentation":"Error \"unsupported URI scheme #{source_uri.scheme}\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/remote_fetcher.rb:199 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a source with an http://, https://, file://, or s3:// URI scheme"],"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"}