Skip to content

Latest commit

 

History

History
30 lines (27 loc) · 1.46 KB

ruby_installation_troubleshooting.md

File metadata and controls

30 lines (27 loc) · 1.46 KB

MacOS 10.14.6 Mojave Users

There are many ways in which trying to install ruby 2.7.2 will go wrong within a modern MacOS environment, and the easiest way to get ruby-build to work with ruby environment managers like rubyenv and asdf is to use Homebrew to install another version of gcc.

Here is a quick outline of the steps that worked as of 10/13/21

alias gcc='gcc-11'
alias cc='gcc-11'
alias g++='g++-11'
alias c++='c++-11'
  • if using asdf package manager, add these lines to the relevant shell profile files mentioned above:
. /usr/local/opt/asdf/libexec/asdf.sh
. /usr/local/opt/asdf/asdf.sh
  • Make sure brew is up to date with brew update and brew upgrade
  • run rbenv install 2.7.2 or asdf install ruby 2.7.2 depending on which ruby version manager you are using
  • Set 2.7.2 to global with rbenv global 2.7.4 or asdf global ruby 2.7.2
  • Verify by running ruby -v and should see
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin18]