Go back RVM

RVM Bundle install fails at Puma "_SSL_get1_peer_certificate Errro 1"

On M1 macbook when bundle install I get:

#...
ld: Undefined symbols:
  _SSL_get1_peer_certificate, referenced from:
      _engine_peercert in mini_ssl.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [puma_http11.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/t/.rvm/gems/ruby-3.2.2/gems/puma-6.4.0 for inspection.
Results logged to /Users/t/.rvm/gems/ruby-3.2.2/extensions/arm64-darwin-22/3.2.0/puma-6.4.0/gem_make.out


SOLUTION 1

solution (by soudai-s)

$ bundle config build.puma --with-pkg-config=$(brew --prefix [email protected])/lib/pkgconfig
$ bundle install --redownload

👍 works


BETTER SOLUTION


this a sign of broken link to ssl . Sure above fix will wprk but next time you willhave same issue. Better is to fix the entire RVM ruby
brew reinstall openssl

 brew unlink openssl && brew link openssl --force
# Unlinking /opt/homebrew/Cellar/openssl@3/3.2.0_1... 5802 symlinks removed.
# Linking /opt/homebrew/Cellar/openssl@3/3.2.0_1... 5802 symlinks created.

#check what version was installed ls /opt/homebrew/Cellar/openssl@3 # 3.2.0_1
rvm install "ruby-3.2.2" --with-openssl-dir=/opt/homebrew/Cellar/openssl@3/3.2.0_1 --verify-downloads 1 rvm install "ruby-3.3.0" --with-openssl-dir=/opt/homebrew/Cellar/openssl@3/3.2.0_1 --verify-downloads 1

 rvm install "ruby-3.3.3"   --with-openssl-dir=/opt/homebrew/Cellar/openssl@3/3.3.0  --verify-downloads 1


make sure this is the right location because sometimes it's /opt/homebrew/Cellar/openssl@3/3.3.0/