Setup a Ruby on Rails Development Mac on OS X Leopard // writing
Only a few weeks ago I wrote up my method for setting up a freshly unboxed Mac for Rails development. I’m now, as one of the apple faithful, upgraded to the latest version of OS X; Leopard.
The biggest change is the inclusion of Rails out of the box, meaning that the palaver of installing it all by hand is over for me. Some other improvements mean that old article is no longer true… so here’s my updated instructions. Note this is for a clean install (a fresh Mac or an Archive and Install) I haven’t messed around with a straight-forward update over the top of an old install.
Setup Dev Environment
Rails comes baked into Leopard along with SVN, mongrels, Capistrano and other rails-y goodness. So to get the latest version, open your terminal and type.
sudo gem update rails
And you’re done for Rails. Awesomeness.
You’ll need to install MySQL as well so head over to the font of all Rails build knowledge to find out how.
Pretty simple though right?
Useful Tools
A list of useful development only tools, I’m saving my other ‘must have’ Mac software for another post, but these are the development focussed applications I need as a minimum to operate.
Textmate
If you’re on a Mac and programming, you basically need TextMate. The de-facto Rails programming environment for virtually everyone. Quite possibly the best 39 Euro you’ll ever spend.
I’m still not getting the most out of it, every time I see one of the other guys the office use it I learn something new. Probably should get round to watching that PeepCode Screencast I’ve got sat on my Macbook.
There’s a new Leopard only version promised for the near future, what greatness that will deliver we can only guess at.
CocoaMySQL
Invaluable in order to troubleshoot exactly what’s going in and out of both your local and your remote databases.
Transmit
Beautifully designed Mac FTP client. Currently runs but has a bug, the next point release (3.6.2) should fix it.
Growl
Not strictly for development but useful as a notification framework that lots of other programs can hook into. i.e. When you get new email, Transmit has finished uploading, tests have passed…
No Longer…
SVN Plugin – I haven’t reinstalled this, I’m back on the command-line.
iTerm – Terminal in Leopard has tabs. Bye, bye, iTerm.
Gems
These are the standard set of Gems I install to get me up and running.
Autotest (and redgreen) (Useful Primer)
You are doing test first development right? This gem enables automatic testing as you code and colorises the output to make it more readable.
sudo gem install ZenTest
sudo gem install redgreen
Piston (Useful Primer)
For keeping your plugins up to date without having to go through the rigmarole of SVN externals.
sudo gem install --include-dependencies piston
ImageScience optional
A quick and dirty image processor that can resize and crop images but not much more. A great alternative to the massive memory hog that is RMagick.
You’ll need to install MacPorts and then type the following into the Terminal.
sudo port selfupdate
sudo port install freeimage
sudo gem install -y image_science
Browsers
As for browser testing I have, rather conveniently, written an article that describes that set up too. It’s equally applicable to web designers as it is to Rails programmers so I broke this article into two so as not to scare any pure front-end people!
That’s my 2 cents
Anything I’ve missed?
Comments
Doug
Mmm, Leopard….
The inclusion of native DTrace support for ruby applications also makes for a sweet deal. It’ll be interesting to see how it compares to railsbench and ruby-prof.