A simple script to quickly install ruby on mac
Since ruby default version that comes with mac doesn't allow update or changing version, this could be a hassle for developers. So i made this script so i can just execute everything without having to worry about it too much.
this simple script will install 4 things on your Mac
- Brew (if not already installed)
- ruby-install
- chruby
- Ruby (stable version)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ahmad-reza619/ruby_mac_installer/HEAD/install.sh)"
brew uninstall ruby-install chruby
rm -rf ~/.rubies/<your installed ruby version>
if you want to use chruby, you have to add this line on your system zshrc or bash_profile
source $HOMEBREW_PREFIX/opt/chruby/share/chruby/chruby.sh # Or run `brew info chruby` to find out installed directory
more info: https://github.com/postmodern/chruby#configuration