Skip to content

Instantly share code, notes, and snippets.

@jimmynguyc
Last active December 29, 2022 08:43
Show Gist options
  • Save jimmynguyc/4c487d1a307111e15a14ec495947ee35 to your computer and use it in GitHub Desktop.
Save jimmynguyc/4c487d1a307111e15a14ec495947ee35 to your computer and use it in GitHub Desktop.
Installing ruby with different OpenSSL lib version using ruby-install
#!/bin/sh
rm -fr ~/.gem/ruby/3.1.2
export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@1.1/lib/pkgconfig"
ruby-install 3.1.2 --install-dir ~/.rubies/ruby-3.1.2ossl11 -- --enable-shared --with-openssl-dir=$(brew --prefix openssl@1.1) CC=clang
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig"
ruby-install 3.1.2 --install-dir ~/.rubies/ruby-3.1.2ossl3 -- --enable-shared --with-openssl-dir=$(brew --prefix openssl@3) CC=clang
#!/bin/sh
chruby 3.1.2ossl11
gem pristine --all
chruby 3.1.2ossl3
gem pristine --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment