Skip to content

FreeBSD: ruby-install configures a broken SSL installation #529

Open

Description

@altruby

Description

An installation of Ruby 4.0.7 configures a broken SSL installation on FreeBSD.

##
# ruby-install --version
ruby-install --version
ruby-install: 0.10.1

##
# uname -a
uname -a 
FreeBSD git.home.network 16.0-CURRENT FreeBSD 16.0-CURRENT #0 : Thu Oct  1 20:45:27 UTC 2026
root@hbsd-os-build-01:/usr/obj/usr/src/amd64.amd64/sys/HARDENEDBSD amd64

##
# Installs OK
# openssl and rust are installed as part of this with pkg(8)
ruby-install ruby 4.0.7 --prefix /usr/local -j 6 -- --enable-yjit

##
# Broken installation 
# No certs found
ruby -rnet/http -e 'p Net::HTTP.get_response(URI.parse("https://google.com"))' 
/../4.0.0/net/protocol.rb:46:in 'OpenSSL::SSL::SSLSocket#connect_nonblock': SSL_connect   
returned=1 errno=0 peeraddr=142.250.219.206:443 state=error: certificate verify failed 
(unable to get local  issuer certificate) (OpenSSL::SSL::SSLError)  
OpenSSL error queue reported 0 errors:  

Workaround

There are no certs installed.
This can be fixed by copying the certs that are bundled with base.

cp /etc/ssl/cert.pem /usr/local/openssl/

Notes

I'm not entirely sure why ruby-install does not re-use OpenSSL from
the base system. It is already installed by default, and it includes the
certs we need in /etc/ssl. Whatever the reason I think there is an
extra step required somewhere, because there are no available certs
in the default setup.

Thanks!

Activity

  1. added a commit that references this issue on Oct 20, 2026
    e1ffea2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions