The following instructions are for students who have completed their Sintatra project and are ready to set up their environment on VirtualBox. Make sure you have completed steps 1-8 from "Installing a Supported Local Environment" before you start. 

 - Set Up the Learn gem

Now we need to setup the Learn gem. Type the following into your terminal: learn whoami

This will prompt you to set up the Learn gem. 

Note: When the gem asks you to go to , you must fill your username into the URL and be logged in to be able to retrieve your token.

Step 10 - Get a Text Editor

Get a Text Editor. We suggest Atom Text Editor

Once you have Atom installed, you can set it as your default text editor in the learn-config file. First, open up the config file for your learn gem with atom ~/.learn-config

You can then change your editor from subl to atom

You can also set the default location that Learn will save all your labs. Save and close the file. Note: These settings only trigger when you use the Open button in Learn or when you use the learn open command. You can always manually clone your labs to any location you wish and open them with any text editor without having to edit this config file.

Step 11 - Install some more gems!

If you’re going to be doing web development on Learn, you’re going to want to install a couple more gems.

  1. Phantom JS is a JavasScript library and this ruby gem easily installs it for you: gem install phantomjs
  2. Nokogiri is a gem that let’s us scrape websites and you’ll definitely want to be able to use it. Let’s install it with: gem install nokogiri .If you encounter any errors while install this gem, check out the Nokogiri support docs for Ubuntu installs. If you check out that page an you still have issues, contact support for help.

Step 12 - Get some databases

You’ll be using a couple of different databases as you move through the web development track. The default database that rails uses is SQLite. We also frequently see that students want to deploy their apps to the free hosting service Heroku. To do this though, you’ll need to be using Postgres instead. It’s best if we just install both of them now so you can use either one.

  1. SQLite: brew install sqlite
  2. Postgres: Install the Postgres app at:

Step 13 - Install Rails

Finally, rails! The powerful ruby web framework. We can install that with: gem install rails
Step 14 - Dotfiles (Optional)

These dotfiles do a variety of different things and I highly recommend you download them. If when you’re trying to back up the files you get the error ‘No such file or directory’, don’t worry. This just means you didn’t have one of these files to start with, so there is nothing to backup.

  1. Back up your .irbrc file with mv ~/.irbrc{,.bak} .
  2. curl "" -o "$HOME/.irbrc"  - This file gives you some nice formatting for when you’re in IRB (IRB lets you write ruby code in your terminal)
  3. Back up your .gitignore file with mv ~/.gitignore{,.bak} .
  4. curl "" -o "$HOME/.gitignore"  - Global .gitignore rules. When you add a .gitignore file to a project, it let’s you specify certain files that you DO NOT want pushed up to github (like API keys…)
  5. Back up your .bash_profile file with mv ~/.bash_profile{,.bak} .
  6. curl "" -o "$HOME/.bash_profile"  - Your bash profile loads up every time you open a terminal window. The Learn bash_profile is designed to load up a bunch of shortcuts for you as well as make sure that RVM loads up every time you open the terminal. I recommend you take a look at this file and even see if there are any shortcuts of your own that you’d like to add! Note: this will overwrite existing bash profile, so back up if you want to.
  7. Back up your .gitconfig file with mv ~/.gitconfig{,.bak} .
  8. curl "" -o "$HOME/.gitconfig"  then atom ~/.gitconfig  (you can access this file with the editor of your choosing) and edit what needs to be edited (github username and github email in a few places).

Step 15 - Node

Now let’s get your node version manager installed. Node is a package manager for JavaScript.

  1. Run curl -o- | bash on terminal. Make sure you do not use sudo.
  2. Then run echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bash_profile.
  3. As well as echo '[ -s "$NVM_DIR/" ] && . "$NVM_DIR/"' >> ~/.bash_profile.
  4. Run source ~/.bash_profile. This will refresh your shell after making these changes. This way you wont have to quit terminal and open it again.
  5. Finally, run nvm install 6.11.2  to get the latest 6.x version of node. 

Step 16 - Install Java Next, we’ll want to install the latest version of the Java Development Kit. To get that, head on over to the download page and select the Java SE Development Kit for Linux and install it.

Did this answer your question?