Skip to content

Instantly share code, notes, and snippets.

@sebyx07
Last active December 25, 2024 08:51
Show Gist options
  • Save sebyx07/3bd2e4e49a5ec713c2517d538c0e8be4 to your computer and use it in GitHub Desktop.
Save sebyx07/3bd2e4e49a5ec713c2517d538c0e8be4 to your computer and use it in GitHub Desktop.
Install ruby 3.3.0 with jemalloc, yjit from rbenv ubuntu 22.04
sudo apt update
sudo apt install libjemalloc-dev libffi-dev libpq-dev libz-dev libyaml-dev build-essential -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bashrc
# new terminal
export PATH="$HOME/.cargo/bin:$PATH"
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
echo 'export MALLOC_CONF="dirty_decay_ms:2000,narenas:2,background_thread:true"' >> ~/.bashrc
echo 'export RUBY_CONFIGURE_OPTS="--with-jemalloc --enable-yjit"' >> ~/.bashrc
echo 'export RUBYOPT="--yjit"' >> ~/.bashrc
RUBY_CONFIGURE_OPTS="--with-jemalloc --enable-yjit" rbenv install 3.3.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment