We need tools in order to program. This is where programming starts. Unfortunately, for many people this is where it also ends. I’ve seen people fighting with incompatible versions or programs and giving up. But don’t worry, I went through this process myself. I tried every piece of software and I can tell you that it works for sure. Follow the instructions and you’ll be fine. Ready, get set, go!
Already have Ruby installed ?
Mac OS X and many modern Linux distributions should already have ruby installed. Open up your terminal and type this:
If you see the version of Ruby, you’re good to go. It should look something like this:
If this is the case, go ahead straight to Day 2: Data Types and Variables
If you see “unknown command” error instead, the Ruby is missing on your system. It’s not a big deal. We’ll install Ruby ourselves.
If you’re on Windows and running a Linux under VirtualBox is not an option, you can still install Ruby using Ruby Installer.
1) Download Ruby Installer
Download Ruby-2.0.0 installer from Ruby Installer download page.
2) Install it
Make sure to check “Add Ruby executables to you PATH” checkbox
3) Check your Ruby installation
Open your Command Prompt to see if Ruby was successfully installed. See the instructions from “Already have Ruby installed ?” section for more information. You should see this
Using Mac OS X?
Most of modern Macs already have ruby installed. If you have an old Mac with no ruby on it, follow these instructions.
1) Install OS X command line tools
Go to the downloads page of Apple Developer Portal. Register or sign in if you have an account already. Search for “Command Line Tools”. Choose the one for you version of OS X (Mountain Lion, Mavericks, etc), download it and install it.
2) Install Homebrew
3) Install rbenv
4) Install Ruby
5) Install Gems
Photo by zzpza