Chris Mendez in For Developers, Ruby, Git, Homebrew

Install Ruby using Brew or Github

This article is designed for developers interested in installing an entirely different version of Ruby on their system.

Method #1

We'll use brew package manager to help you install rbenv. rbenv is what you will use to install ruby.

Step 1

Remove existing version of rbenv

 rm -rf ~/.rbenv

Step 2

Uninstall rbenv

brew uninstall rbenv  

Step 3

Update homebrew

brew update  

Step 4

Installing rbenv through brew

brew install rbenv  

Step 5

Installing ruby-build package

brew install ruby-build  

Method #2

1. Installing rbenv from Github

git clone ~/.rbenv  

2. Install ruby 2.x.x

rbenv install 2.x.x  

3. Reload

rbenv rehash  


If you run into any trouble, read below: