Ruby For Programmers – Part 4294967295: Installing Ruby

Props to the first person to get the joke in the title.

The official website of Ruby is: http://ruby-lang.org. As such, that’s the only location to download Ruby for the paranoid. For our purposes though, there’s easier install methods.

So the first step of Ruby is to install it. It’s a pretty simple enough, but here’s the only part where the instructions have to split between OSes:

Windows

  1. Download and Install Ruby 1.9.3 from http://rubyinstaller.org/downloads.
  2. Download and Install the “devkit” from http://rubyinstaller.org/downloads.
  3. You can use the MinGW terminal it pre-installs if you are familiar with UNIX/POSIX commands, or you can use cmd or PowerShell if that’s your preference.
  4. In theory it should preinstall the correct PATH, so all you need to do is type “ruby -v” and get a reply. If it says “ruby 1.9.3…” then it works fine.

Mac

  1. Good News: Ruby is preinstalled. \o/
  2. Bad News: It’s the old version. So let’s make our own version using rvm:
  3. Install the Command Line Tools from https://developer.apple.com/downloads/index.action. (Optionally, it’s also available in XCode if you already have XCode installed.)
  4. Run the following command:
    curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3
  5. Sit for awhile while it works.
  6. Close and restart Terminal.
  7. Run: rvm 1.9.3 --default

Linux

You probably know better than me on this. Generally speaking your package manager will have Ruby available in packages named either “ruby” or “ruby-1.9” or “ruby-1.9.3”.

When you have it installed, party.

If you can run ruby -v and have it show the Ruby version, you are good to go and started!