Skip to content

Instantly share code, notes, and snippets.

@hopsoft
Created May 21, 2019 16:13
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save hopsoft/9e2b89688b56f3b59cb6b9fc8cfdeeb0 to your computer and use it in GitHub Desktop.
Save hopsoft/9e2b89688b56f3b59cb6b9fc8cfdeeb0 to your computer and use it in GitHub Desktop.
Install ruby with rbenv and jemalloc on ubuntu
sudo apt-get update
sudo apt-get install libjemalloc-dev
RUBY_CONFIGURE_OPTS='--with-jemalloc' rbenv install 2.6.3
# test (look for jemalloc warnings)
MALLOC_CONF=invalid_flag:foo ruby -v
@mcreenan
Copy link

Thanks for this, especially the command to test.

@timokleemann
Copy link

timokleemann commented Feb 27, 2024

Worked for me too, thanks a bunch 👍

Note that you may also run ruby -r rbconfig -e "puts RbConfig::CONFIG['MAINLIBS']" to confirm. If you see a flag -ljemalloc, jemalloc should be working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment