{"record":{"id":"c98d4a69df993485","repo":"ruby/rubygems","slug":"openssl-is-not-available-install-openssl-and-rebu","errorCode":null,"errorMessage":"OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources","messagePattern":"OpenSSL is not available\\. Install OpenSSL and rebuild Ruby \\(preferred\\) or use non-HTTPS sources","errorType":"exception","errorClass":"Gem::Exception","httpStatus":null,"severity":"error","filePath":"lib/rubygems/request.rb","lineNumber":54,"sourceCode":"\n    @connection_pool = pool\n  end\n\n  def proxy_uri\n    @connection_pool.proxy_uri\n  end\n\n  def cert_files\n    @connection_pool.cert_files\n  end\n\n  def self.get_cert_files\n    pattern = File.expand_path(\"./ssl_certs/*/*.pem\", __dir__)\n    Dir.glob(pattern)\n  end\n\n  def self.configure_connection_for_https(connection, cert_files)\n    raise Gem::Exception.new(\"OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources\") unless Gem::HAVE_OPENSSL\n\n    connection.use_ssl = true\n    connection.verify_mode =\n      Gem.configuration.ssl_verify_mode || OpenSSL::SSL::VERIFY_PEER\n    store = OpenSSL::X509::Store.new\n\n    if Gem.configuration.ssl_client_cert\n      pem = File.read Gem.configuration.ssl_client_cert\n      connection.cert = OpenSSL::X509::Certificate.new pem\n      connection.key = OpenSSL::PKey.read pem\n    end\n\n    store.set_default_paths\n    cert_files.each do |ssl_cert_file|\n      store.add_file ssl_cert_file\n    end\n    if Gem.configuration.ssl_ca_cert\n      if File.directory? Gem.configuration.ssl_ca_cert","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/request.rb#L36-L72","documentation":"Error \"OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/request.rb:54 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reinstall/rebuild Ruby with OpenSSL support (preferred)","Or configure RubyGems to use non-HTTPS sources (not recommended)"],"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"}