building the platform

26. November 2006, 14:59

Another pleasant way to while away the hours is to get all the bits and pieces required for Ruby on Rails development onto one’s machine.

You see, I’ve kind of done this ass-backwards, where I’ve picked a development stack – a trendy one – and then thought of an idea to use it with.

Anyway, there are two major ways of doing this on the Mac: either you download Locomotive, which provides a nice sandboxed little play area, or you do all the downloading, compiling, and installing stuff manually. Since getting my new MacBook I’ve been using Locomotive out of some strange fear of fiddling with the system too much. It’s nice, but I find it restricting in some hard to define way compared to the handrolled install I had on my old iBook. So I decided to go the manual route.

Now it turns out there’s at least two major ways of doing this, too: Dan Benjamin’s way, and the MacPorts way.

I started with the first of these. Unfortunately, I didn’t get far: I was getting persistent crashes of the Terminal in the middle of the “Make” steps (and sometimes before). So I gave up and tried the MacPorts method. I had a few crashes here too, but eventually got out the other side to where I needed to install the Ruby-MySQL bindings (don’t ask me exactly what they do, I’m just following orders). MacPorts wanted to download and install a whole new instance of MySQL, and I couldn’t figure out how to make it realise that I already had an install that I wanted to keep using (full of my localhosted sites used for development and testing). Not only that, but my existing install obtained directly from MySQL itself had several useful admin tools – like a prefpane for launching and terminating the service – that I wasn’t sure how to make work with the MacPorts version. I’m sure there is a way, but I was weary of trying to find it.

So I tossed MacPorts – I’ll come back to it another day, it’s a great tool. After a restart I seemed to be able to happily compile again, so I resumed the Benjamin method. The only departure from instructions I made was to make sure I had the latest version of everything in each case. It all seemed to compile OK.

So far, so good. I now have the complete stack, ready for use. I have a copy of TextMate, the editor du jour for Mac developers. I have two books on the subject of Ruby, and Rails. And I have an Idea.

Now I just need to figure out how the hell to implement it.

Links

Next/Prev