Other Pages

Expand All

OS X RVM

Step 1: Open Terminal

Look for Terminal.app inside Applications -> Utilities, or use Spotlight search (Command + Space Bar) to find it.

Add it to your dock; you'll be using it a lot. (To add it to the dock, click and hold the dock icon once Terminal is open. Select options -> keep in dock.)

Arrange your windows so that Terminal and your web browser are next to each other. You will want to read from your browser and type into your terminal at the same time.

Step 2: Install A Compiler (XCode or GCC)

Step 3: Install Homebrew

Type this in the terminal:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

You may have to press 'ENTER' when prompted and type in your password.

If that doesn't work, visit https://github.com/Homebrew/homebrew/wiki/installation and follow the instructions there.

Verify

Type this in the terminal:
brew -v
Approximate expected result:
Homebrew 1.1.13-19-g55c02ae77
Homebrew/homebrew-core (git revision 4075; last commit 2017-04-18)
The greyed-out text may differ and is not important.

Step 4: Install Git

Next we'll install Git, the most popular version control system in the Ruby world:

Type this in the terminal:
git --version
Approximate expected result:
git version 2.x.x
The greyed-out text may differ and is not important.

If you see that output, you have Git. Move on to the next step.

Otherwise, type this in the terminal:
brew install git

Verify

Type this in the terminal:
git --version
Approximate expected result:
git version 2.x.x
The greyed-out text may differ and is not important.

Step 5: Install RVM, the Ruby Version Manager

RVM stands for Ruby Version Manager and is the easiest way to install and manage Ruby. The official RVM install instructions are available here, but this should work for you:

Step 5.1: Install RVM

Type this in the terminal:
curl -L get.rvm.io | bash -s stable

This will download and install RVM.

You might see an error like "GPG signature verification failed"

If so, run the suggested command to add RVM's GPG keys:

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3"

(the command may start with gpg or gpg2 -- use whichever was provided in the RVM error message)

Afterward, try installing RVM again:

curl -L get.rvm.io | bash -s stable

Step 5.2: Configure your shell

Every time you open a new terminal window, rvm will be active inside it. Close your terminal window and open a new one.

Verify

Type this in the terminal:
type rvm | head -1
Expected result:
rvm is a function
Type this in the terminal:
rvm -v
Approximate expected result:
rvm 1.x.x (stable) by Wayne E. Seguin (wayneeseguin@gmail.com), Michal Papis <mpapis@gmail.com> [https://rvm.io/]
The greyed-out text may differ and is not important.

Step 6: Configure RVM to use Homebrew

Type this in the terminal:
rvm autolibs homebrew

Step 7: Install Ruby

Type this in the terminal:
rvm install 2.3.8

This downloads and compiles Ruby, which takes a while.

Type this in the terminal:
rvm use 2.3.8
Type this in the terminal:
rvm --default use 2.3.8

Verify

Type this in the terminal:
ruby -v
Approximate expected result:
ruby 2.3.8.0p0 (2014-12-25 revision 49005) [x86_64-darwin13]
The greyed-out text may differ and is not important.

Troubleshooting

If rvm install 2.3.8 says autoreconf was not found in the PATH

Mac OS
Type this in the terminal:
brew install automake
Ubuntu Linux
Type this in the terminal:
sudo apt-get install automake

Once that completes, retry rvm install 2.3.8

Step 8: Install Rails

Type this in the terminal:
gem install rails

Verify

Type this in the terminal:
rails -v
Approximate expected result:
Rails 5.0.x
The greyed-out text may differ and is not important.

Step 9: Install Atom

We'll be using the Atom text editor during the workshop, though you are free to use a different editor if you prefer. It must be a plain-text editor, such as vi or TextMate.

Microsoft Word and other word processing programs, including TextEdit and Notepad, will not work.

When in doubt, use Atom.

Step 9.1: Download Atom

Download the Atom installer.

Step 9.2: Find the downloaded file in Finder

If you weren't asked where to save it, it's probably in the Downloads folder.

Step 9.3: Extract Atom and move it to your Applications folder.

Double click the Atom .zip file to extract it. Drag Atom into your Applications folder.

Animation of extracting the Atom zip file and moving the contents to the Applications folder

Verify successful installation

Type this in the terminal:
git --version
Approximate expected result:
git version 2.x.x
The greyed-out text may differ and is not important.
Type this in the terminal:
which ruby
Approximate expected result:
/Users/alex/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
The greyed-out text may differ and is not important.
Type this in the terminal:
which rails
Approximate expected result:
/Users/alex/.rvm/gems/ruby-2.0.0-p247/bin/rails
The greyed-out text may differ and is not important.

Next Step: