Skip to content

Instantly share code, notes, and snippets.

@jjb
Last active May 6, 2022 20:33
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 jjb/6928376 to your computer and use it in GitHub Desktop.
Save jjb/6928376 to your computer and use it in GitHub Desktop.
Installing ruby on MacOS with rbenv / ruby-build using readline from macports
sudo port -v selfupdate
sudo port install rbenv
sudo port install ruby-build
sudo port install readline
RUBY_CONFIGURE_OPTS="--with-readline-dir=/opt/local" rbenv install 2.7.1
# this gist previously also specified the openssl dir,
# but these days ruby-build downloads and builds its own openssl for you
# --with-openssl-dir=/opt/local
# if ruby is using readline, `Readline.emacs_editing_mode` will return nil
# if ruby is using libedit, `Readline.emacs_editing_mode` will raise NotImplementedError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment