Ruby on Rails - Getting Starting on OS X

This week I have been devoting some time to learning Ruby. I'm starting with the language itself so that I can come at Rails versed in the underlying architecture. I'm a big believer in building up a decent mental model of the lower levels of a system before I begin using higher level tools.

Which is why I spent quite a bit of time messing around with DarwinPorts, installing Ruby, Rails, RubyGems, MySQL, and lots of other software. One of the things that I've heard in complaints about Ruby, and frankly about many open source projects, is that installation can be tricky and sometimes downright painful. And I'd have to say that there are a few hiccups in getting Rails working on OS X.

All of these are of course documented on numerous websites. And many of them don't even conflict with each other. After some reading, I decided to stick with DarwinPorts, which is the package manager I've had the most success with on OS X. Yes, I know I could download tar-balls, but after years of using Windows and installing binaries, I'm still getting used to the idea of actually trusting somebody else's compiled source to make a usable binary on my machine.

Besides the build time, it wasn't too difficult a process. I would document it here, linking you to the web sites I referred to. But I've discovered something I like even better. I'm glad I worked through the piecemeal approach, but if you're interested in getting running quickly I recommend checking out Locomotive. It's a complete self-contained collection of Bundles that provide a complete working Rails development environment, completely isolated from all other Rails or Ruby installations on your system. And it's integrated with TextMate as well, which makes it very easy to edit the application. Combining these two tools, you've got a pretty much full-featured Rails IDE for application development.

I still think there is a market for a more feature-rich IDE, especially if it included deployment, test running, context sensitive help and statement completion. But that product is still a ways off, and in the meantime, Locomotive and TextMate are a great way to get up and writing Rails apps in minutes. About 5 minutes total, if you have a decent net connection.