Companion notes for my 'Ruby on Ales' Belfast Ruby talk on an Introduction to Ruby. Slides are available on Speakerdeck.
One of the first and most important things to setup is a good text editor which you are comfortable using and will play nicely with Ruby projects. I'd recommend having a look at (and using) Sublime Text. It's an amazing editor, blazing fast, supports a huge amount of different languages and also has Mac, Windows and Linux support.
These instructions are focused on installing Ruby on a Mac but some steps will also apply to a Linux machine, although depending on what distro you're using may vary.
iTerm 2 (Mac Only)
iTerm 2 is a replacement for the Terminal.app which ships with OS X. It's a big improvement over Terminal.app and allows you to better organise your workflow by being able to use both tabs and split panes, this means you can focus on your project instead of how many Terminal windows you have open, and where they are.
Get Homebrew (Mac only)
Homebrew is an open source package manager for Mac written in Ruby. It allows you to install common open source software and libraries with minimal fuss. For example, if you need a database installed on your machine you can get one with brew install mysql
or brew install postgresql
. Or if you want to use Git for source control you can install it with brew install git
.
Install Homebrew
Run this in your terminal:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Get RVM (Mac + Linux)
Ruby Version Manager allows you to have multiple versions of Ruby installed on your machine and lets you easily switch between them, it can be useful if you have many Ruby projects that use a particular version of Ruby, each with their own specific set of Gems.
Mac OS X comes preinstalled with Ruby, however, unless you are running Mavericks it will be an older version of Ruby. Managing Rubies with RVM allows you to avoid using sudo to install gems and also ensures that if you upgrade your Mac, and Apple have changed something with the Ruby setup (which they often do), it's likely that your Ruby versions and projects will still work, as they are separate and independent of the system Ruby on OS X.
Install RVM
Run this in your terminal:
\curl -sSL https://get.rvm.io | bash -s stable
I've not much experience with running Ruby or working on Ruby projects on Windows, although typically I've found that Windows can be temperamental (to say the least) when trying to use tools outside of the Microsoft ecosystem.
RubyInstaller is a self contained installer for Windows which will install a version of Ruby and RubyGems and some required extensions to get Ruby working on Windows.
How about Xcode or Commandline Tools requirement?