Skip to content

Instantly share code, notes, and snippets.

@tiagocasanovapt
Last active March 7, 2023 15:37
Show Gist options
  • Save tiagocasanovapt/7809ce9f67dd0e6beb0bc84070cd1292 to your computer and use it in GitHub Desktop.
Save tiagocasanovapt/7809ce9f67dd0e6beb0bc84070cd1292 to your computer and use it in GitHub Desktop.
Ruby 3 in 2023
brew install rbenv ruby-build
# for YJIT
brew install rust
# for "-dev" versions
brew install bison
# currently for version 5
brew install jemalloc
# to properly recognize jemalloc
export LDFLAGS="-L$HOMEBREW_PREFIX/opt/jemalloc/lib"
export CPPFLAGS="-I$HOMEBREW_PREFIX/opt/jemalloc/include"
# Compile latest Ruby with YJIT & jemalloc and keep the source code
RUBY_CONFIGURE_OPTS="--enable-yjit --with-jemalloc" rbenv install 3.3.0-dev --keep
# verify everything is OK
ruby -e "puts RbConfig::CONFIG['MAINLIBS']" -v --yjit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment