Cloud 9


Step 1

Cloud 9 is the easiest way to start developing. It's gives you everything you need without the hassle of downloading Ruby on Rails and the various tools it requires. There are multiple tiers for Cloud9, but the free one will work for class. You can sign up at c9.io

Step 2

In Cloud9, go to your settings by clicking the gear on the top right.

Select SSH Keys from the menu on the left side. Copy the key.

Step 3

Now let's set up github. If you haven't already, visit github.com and create a free account.

Step 4

Once your logged in, click on the top left icon Settings SSH keys Add SSH key

Enter a title you'll remember. Titles are a friendly way to identify which key is associated to a computer. If you replace your computer, you'll want to delete the key that is associated with it.

Paste your SSH Key and click Add Key!

Step 5

Finally, sign up for a free account at Heroku.com

Step 6

Let's create your workspace for the course. After you sign in to c9.io, you see a dashboard with a gray box to create a new workspace. Click on it!

  • Fill out a workspace name. "Tech Talent South", or "Code Immersion" are good names!
  • Fill out a helpful description :)
  • It should be a hosted workspace.
  • Can be private or public.
  • Ignore Clone from Git.
  • Template should be blank.

This will create a "virtual workspace" using a Linux distrobution known as Ubuntu. This workspace includes everything you need to learn how to build web applications, and is just like having a local environment setup, but in the cloud!

Step 7

git is already installed, but let's just make sure by running this command in the terminal area at the bottom (blue area).

$ git --version

You should see a version number returned like:

git version 2.8.3

Now we'll set up Git. Make sure to use the same email you used for your Github and Heroku accounts. run these commands below, replacing the placeholders with your information.

$ git config --global user.name "ENTER YOUR ACTUAL NAME"
$ git config --global user.email "ENTER YOUR ACTUAL EMAIL ADDRESS"

Now let's make sure that worked. In your Terminal type:

git config --get user.name

Note:You should see your name.

git config --get user.email

Note:You should see your email.

Step 8

rvm is also already installed, but again to make sure, let's run this command:

$ rvm -v

This should return something similar to:

rvm 1.27.0 (latest) by Wayne E. Seguin, Michal Papis[https://rvm.io/]
Step 9

Now we'll want to make sure your ruby version is up to par. We're looking for 2.4 or higher, so let's check it with:

$ ruby -v

If your version is not up to date, let's run this command:

$ rvm install 2.4.0

Once installed let's run this command to make this version of ruby your default:

$ rvm 2.4.0 --default
Step 10

After you update your version of ruby, let's install rails. We'll do that by running this command:

$ gem install rails

Now you should be good to go!

Things to keep in mind

Working in Cloud9 is just like working in a linux/unix/mac environment. The key difference is instead of using several tools (like terminal, sublime text, chrome) everything you do will be in this one tool, Cloud9.


When running a rails application we typically write the rails s command. However, in Cloud9 you can run your server in 1 of two ways:

  1. $ rails s -b $IP -p $PORT
  2. Or by hitting the run button in the upper nav bar!

Both of these actions will run the app at a specif url, rather than the typical localhost:3000. That url typically follows this convention

https://workspacename-username.c9users.io/

but you can always get to it by hitting the preview button. You may want to pull that url into a different tab, rather than running it in cloud9.