Install Ruby using Brew or Github
This article is designed for developers interested in installing an entirely different version of Ruby on their system.
brew package manager to help you install
rbenv is what you will use to install ruby.
Remove existing version of rbenv
rm -rf ~/.rbenv
brew uninstall rbenv
Installing rbenv through brew
brew install rbenv
Installing ruby-build package
brew install ruby-build
rbenv from Github
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
2. Install ruby 2.x.x
rbenv install 2.x.x
If you run into any trouble, read below: