Skip to content

Instantly share code, notes, and snippets.

@frizbee
Forked from hopsoft/install-ruby.sh
Last active November 12, 2022 05:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frizbee/0a0d55ffe9858741fdecbab5ead9196f to your computer and use it in GitHub Desktop.
Save frizbee/0a0d55ffe9858741fdecbab5ead9196f 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.7.1
rbenv global 2.7.1
# test (look for jemalloc warnings)
MALLOC_CONF=invalid_flag:foo ruby -v
# check
ruby -r rbconfig -e "puts RbConfig::CONFIG['MAINLIBS']"
#> -lz -lpthread -lrt -lrt -ljemalloc -ldl -lcrypt -lm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment