3) Install Homebrew

Warning: A newer Command Line Tools release is available
Update them from Software Update in the App Store.
Warning: You have not agreed to the Xcode license.
Builds will fail! Agree to the license by opening Xcode.app or running:
xcodebuild -license

Open XCode, agree the license, close and run again

brew doctor

4) Install RVM

\curl -sSL https://get.rvm.io | bash -s stable

source ~/.rvm/scripts/rvm

Be sure "rvm is a function"

type rvm | head -n 1

5) Install RVM requirements

brew update

rvm requirements

If you get an error something like:
No available formula for apple-gcc42
and cannot continue installing, run this code: