brew install rbenv/tap/[email protected]
rbenv install 3.0.7 -- --with-openssl-dir="$(brew --prefix [email protected])"
Note
Installing Ruby 3.0 on macOS 14+ is likely to fail with the error message:
bigdecimal.c: error: 'maybe_unused' attribute cannot be applied to types
.
If that happens, this upstream patch might help:
curl -fsSL https://github.com/ruby/ruby/commit/1dfe75b0beb7171b8154ff0856d5149be0207724.patch | \
rbenv install 3.0.7 --patch -- --with-openssl-dir="$(brew --prefix [email protected])"
brew install rbenv/tap/[email protected]
rbenv install 2.3.8 -- --with-openssl-dir="$(brew --prefix [email protected])"