Other Pages

Expand All

Linux

These steps apply to Ubuntu Linux only. If you are using some other flavor of Linux, get help from a TA.

You will need sudo access in order to complete these directions (The first user account has this by default).

Step 1: Install packaged software and libraries

Open a terminal (Applications > Accessories > Terminal). You may want to right-click on the terminal icon and select "Add to panel" so the icon will appear next to the default help and Firefox icons in the top panel.

Type this in the terminal:
sudo apt-get install autoconf automake bison build-essential curl git-core libapr1 libaprutil1 libc6-dev libltdl-dev libreadline6 libreadline6-dev libsqlite3-0 libsqlite3-dev libssl-dev libtool libxml2-dev libxslt-dev libxslt1-dev libyaml-dev ncurses-dev nodejs openssl sqlite3 zlib1g zlib1g-dev

If you get an error during apt-get resembling

Failed to fetch cdrom://Ubuntu...

it is because apt-get is trying to install packages from your Ubuntu install CD. If you don't have that CD on hand, you can try disabling it as a package source by following this Stack Overflow post:

http://askubuntu.com/questions/125111/failed-to-download-repository-information-due-to-missing-cdrom

Step 2: Install git

Type this in the terminal:
sudo apt-get install git

If this results in an error, you should be ok, as the prior step should have installed git-core

Step 3: Install RVM

If you're using Ubuntu 12.04, Ubuntu 14.04 or the latest version of Mint, ensure that the Run command as login shell option is checked under the Title and Command tab in Profile Preferences (located in Terminal's Edit menu). After changing this setting, you may need to exit your console session and start a new one before the changes take effect.

Ubuntu 12.04 terminal settings

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 3.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 3.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 4: Install Ruby

Type this in the terminal:
rvm install 2.3

This downloads and compiles Ruby, which takes a while.

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

Verify

Type this in the terminal:
ruby -v
Approximate expected result:
ruby 2.3.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 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

Step 5: Install Rails

Using a terminal again, execute the following command to install rails.

Type this in the terminal:
gem install rails

Step 6: Atom

If you don't have a preferred code editor, you can install Atom.

Checkout this section of the Atom manual for the latest instructions.

Next Step: