ruby/rubygems · error · Gem::Exception
OpenSSL is not available. Install OpenSSL and rebuild Ruby (
Error message
OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources
What it means
Error "OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources" thrown in ruby/rubygems.
Source
Thrown at lib/rubygems/request.rb:54
@connection_pool = pool
end
def proxy_uri
@connection_pool.proxy_uri
end
def cert_files
@connection_pool.cert_files
end
def self.get_cert_files
pattern = File.expand_path("./ssl_certs/*/*.pem", __dir__)
Dir.glob(pattern)
end
def self.configure_connection_for_https(connection, cert_files)
raise Gem::Exception.new("OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources") unless Gem::HAVE_OPENSSL
connection.use_ssl = true
connection.verify_mode =
Gem.configuration.ssl_verify_mode || OpenSSL::SSL::VERIFY_PEER
store = OpenSSL::X509::Store.new
if Gem.configuration.ssl_client_cert
pem = File.read Gem.configuration.ssl_client_cert
connection.cert = OpenSSL::X509::Certificate.new pem
connection.key = OpenSSL::PKey.read pem
end
store.set_default_paths
cert_files.each do |ssl_cert_file|
store.add_file ssl_cert_file
end
if Gem.configuration.ssl_ca_cert
if File.directory? Gem.configuration.ssl_ca_certView on GitHub (pinned to 86cbb817a3)
Solutions
- Reinstall/rebuild Ruby with OpenSSL support (preferred)
- Or configure RubyGems to use non-HTTPS sources (not recommended)
When it happens
Trigger: Thrown at lib/rubygems/request.rb:54 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ruby/rubygems@86cbb817a3 (2026-08-23).
Data as JSON: /api/errors/c98d4a69df993485.
Report an issue: GitHub.