Installing ruby using homebrew is easy.
Rvm install latest ruby mac.
Brew install ruby.
This should install the latest stable ruby version.
If the rvm install script complains about certificates you need to follow the displayed instructions.
Install rvm with the latest ruby 2 2 0 and rails 4 2 0 rvm stands for ruby version manager and is one of the most popular tools that allow you to install and manage multiple versions of ruby and rails on the same computer.
I chose to install rvm with the latest stable version of ruby which at the time was 2 2 0.
Most of the time this is the result of apple s xcode not being installed on your system or if it is not being the current version.
Any ruby based application will benefit from your use of rvm.
Homebrew macos ruby versions 2 0 and above are included by default in macos releases since at least el capitan 10 11.
Sudo pacman s ruby.
Rvm default ruby v ruby 2 1 1p76 2014 02 24 revision 45161 x86 64 darwin12 0 to show what ruby is currently the selected default if any do.
Install the latest version of ruby.
Rvm has come a long way since i originally published this tutorial.
Rvm install ruby version in my case this was.
On linux unix you can use the package management system of your distribution or third party tools rbenv and rvm.
C url ssl https get rvm io bash s stable ruby after the installation completes close the terminal window and open a new one to make sure that terminal picks up any environment changes.
Here you can get the latest ruby distributions in your favorite flavor.
Rvm enables you to easily test both upgrade and escape paths very easily and consistently.
On macos machines you can use third party tools rbenv and rvm.
Once this command has finished running you may need to restart your terminal for rvm to be recognised.
Rvm if the install script is run as a standard non root user rvm will install into the current users s home directory.
With rvm you can run a test suite rake tasks benchmarks and gem commands against multiple ruby versions at the same time.
Rvm use system ruby v ruby 2 0 0p451 2014 02 24 revision 45167 universal x86 64 darwin13 to switch at any time to the ruby you have selected as default.
Homebrew is a commonly used package manager on macos.
We have several tools on each major platform to install ruby.
This took a while to run as it had to install a lot of dependencies and asked for my permission a couple of times.
From my experiences the biggest gotcha is when you try to install a new version of ruby with rvm and you re met with a handful of confusing errors.
Ways of installing ruby.