Skip to content

Instantly share code, notes, and snippets.

@ambsvan
Forked from monicao/notes.md
Created July 1, 2014 20:13
Show Gist options
  • Save ambsvan/1903b631b3826439d44c to your computer and use it in GitHub Desktop.
Save ambsvan/1903b631b3826439d44c to your computer and use it in GitHub Desktop.

Why would I want to do that?

  • You want to run guard
  • You want use Sublime plugins (like RSpec or Guard plugins)

Installing brew

Brew aka Homebrew is a package management system for Mac OSX.

Open up the Mac Terminal and run this command to install brew on your mac:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

Install ruby through rbenv

Now that we have Homebrew installed, we can use it to install Ruby.

We're going to use rbenv to install and manage our Ruby versions.

To do this, run the following commands in your Terminal:

brew install rbenv ruby-build

# Add rbenv to bash so that it loads every time you open a terminal
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile

# Install Ruby 2.1.2 and set it as the default version
rbenv install 2.1.2
rbenv global 2.1.2

ruby -v
# ruby 2.1.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment