Setting up my Ruby on Rails development environment (2012)

Mac screen

Ruby on Rails on Mac OS X Mountain Lion

This post was originally published on one of my old blogs

I recently bought a new 2012 Apple MacBook Air (two word review: love it!) and spent a fair bit of time getting it set up to use for Ruby on Rails development. If you’re also setting up your system for the first time it can be pretty complicated, so – what have I done so far?

(Note: I’m not a professional developer. I’m learning while I build my first real app and I’ve decided to blog about my progress.

The System Files

Rails Installer for Mac OS X

OS X comes with Ruby on Rails preloaded but it’s good to make sure you have the latest versions of  all the software when you’re getting setup. This job is made super quick and easy with the great tool Rails Installer (also available for Windows). What’s so great about it? Not only does it provide you with easily installed, up to date versions of Ruby 1.9.3 and Rails 3.2.7 (latest versions at time of post) but it also installs other common packages essential for Rails development, including:

  • Git: essential for source control management/version control, lets you track changes to your code (and helps you recover from the inevitable screw-ups that occur)
  • RVM/JewerlyBox: allows you to manage and work with multiple ruby environments/versions
  • SQLite: a simple SQL database that can be used to develop Rails applications

Link: RailsInstaller.org

Homebrew

Homebrew is a package management system for MacOS that makes it incredibly easy to download/update unix packages directly from the command line. How easy? Say you wanted to install Git (without using Rails Installer) – all you’d have to type at the command line is:

$ brew install git

That’s it!

And if I need to update Git?

$ brew update git

Simple. And I like simple.

Text Editor – Sublime Text 2

You’re going to be spending a lot of time in your text editor so it’s important you choose a good one. I’m using Sublime Text 2 which has a number of really cool features incl. ‘GoTo Anything’ (opens files super fast with fuzzy searching), Multiple Selections and split editing.

You can also use an add-on called ‘Package Control‘ to quickly add user created packages to Sublime Text, including new syntax highlighters and code snippets (I’m using one to add syntax to CoffeeScript and a package called Emmet for faster HTML & CSS coding).

There is a good free tutorial screencast series available for Sublime Text at Tuts+. If, like me, you’re relatively new to development I highly recommend it as it’ll teach you a bunch of tips and tricks to dramatically speed up your coding.

Other Apps

Browsers – Chrome, Safari, Firefox, IE and Opera

Lastly, if you’re going to be developing for the web it’s important to make sure you have a copy of all the main browsers and frequently test your site with each.

Each browser can have little differences in the way they display HTML, CSS, JavaScript and the like so it’s important to make sure your site works for all of your potential visitors/customers.

GIMP (GNU Image Manipulation Program)

A free and open source image editor and alternative to Photoshop, GIMP remains very powerful and is a great way to manipulate images (again – for free!) for your web app.

Evernote

Evernote is an app for your PC and Android iOS mobile that lets you take notes (written, pics, voice, video etc) and place them by subject in ‘notebooks’ which can be synced via the cloud.

As I seem to be in the habit of having my ‘bright ideas’ while I’m walking to/from class (must be all the ‘fresh’ Swedish air) I use Evernote on my phone to make sure I have somewhere to put them before they are forgotten.

Later when I return home I can turn on my pc and my ideas are right there on the screen (and usually much less impressive seeming).

Tips?

As I said at the top of the page, I’m only recently back on the ‘Mac-Train’ so if you have any tips or ideas for apps that you recommend then please let me know in the comments, I’d love to hear them.

About David Turnbull
I'm a New Zealander in Sweden, building web-apps with Ruby on Rails.

Recent posts