There are tools to change Ruby versions on the fly. Some popular tools are RVM and Rbenv. Using these tools we can change Ruby versions on the fly. On OSX Yosemite 10.10 though you will trap into the issue which doesn’t allow you to install Ruby with RVM or RBenv. You will have some trouble installing ‘gcc’. Error looks like this
The error shows that there is issue installing gcc48.
There is easy but temporary fix to solve this issue.
Just run following command from your terminal
This will resolve an issue you can install required ruby version successfully.
Enjoy Ruby on OSX Yosemite 10.10.