brew remove rbenv
rm -rf ~/.rbenv
Remove the following line from your .zshrc
eval "$(rbenv init - zsh)"
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
brew uninstall --ignore-dependencies readline
brew uninstall --ignore-dependencies openssl
brew uninstall --ignore-dependencies ruby-build
rm -rf /opt/homebrew/etc/[email protected]
brew install -s readline
brew install -s openssl
brew install -s ruby-build
brew reinstall [email protected]
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix [email protected])"
export LDFLAGS="-L/opt/homebrew/opt/readline/lib:$LDFLAGS"
export CPPFLAGS="-I/opt/homebrew/opt/readline/include:$CPPFLAGS"
export PKG_CONFIG_PATH="/opt/homebrew/opt/readline/lib/pkgconfig:$PKG_CONFIG_PATH"
export optflags="-Wno-error=implicit-function-declaration"
export LDFLAGS="-L/opt/homebrew/opt/libffi/lib:$LDFLAGS"
export CPPFLAGS="-I/opt/homebrew/opt/libffi/include:$CPPFLAGS"
export PKG_CONFIG_PATH="/opt/homebrew/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH"
brew install asdf
. /opt/homebrew/opt/asdf/libexec/asdf.sh
asdf plugin add ruby
asdf install ruby 2.6.6
asdf local ruby 2.6.6
Note: this will create a
.tools-version
file thatasdf
uses to determine versions.