Error installing any ruby version with RVM on OSX
I ran into the same issue, you need to manually install all the required packages using Brew. For me I had to run the following installs:
brew install autoconf
brew install automake
brew install libtool
brew install apple-gcc42
brew install libyaml
brew install libxslt
brew install libksba
brew install openssl
You just need to keep running "rvm requirements" and reading the log and installing the packages needed until there are no more errors.
This solved problem for me
sudo chown -R `whoami` /Library/Caches/Homebrew/
After installing RVM, You'll want to run
rvm requirements
to see if anything else is required to install ruby and rails first.
here is the similar question asked rvm install ruby