LightTPD and Intel Macs: Friends at Last

Many people who’d tried following my Ruby, Rails, and LightTPD installation tutorial on their Intel Macs were reporting that, despite an error-free compile, LightTPD wouldn’t work with their Rails apps.

I’d run into this on day one as well. The problem, it turns out, wasn’t with LightTPD so much as with PCRE, a prerequisite LightTPD needs so that Rails can do its rewriting.

While it was still possible to run our Rails apps using Webrick (Rails’ built-in webserver), there were numerous downsides to this method.

So, after quite a bit of trial and error, and with some help from my friends (and a few newsgroups), I’ve managed to get LightTPD working on Intel Macs, and have updated the tutorial to reflect what I’ve learned.

From the tutorial:

The setting has to do with GCC optimization levels, and we’re taking it down one level from the default (2) for the PCRE compile. This shouldn’t affect performance or even compile time, but if you’re on a non-Intel Mac and care about such things, feel free to leave the CFLAGS=-O1 parameter off.

I have also updated the tutorial to include the latest version of PCRE, but I’m still recommending the MySQL 4.1 and LightTPD 1.4.8 branches, as they have still proven themselves to me to be more stable in daily use.

So if you’re lucky enough to have one of the new Intel Macs, go build yourself a working Ruby, Rails, and LightTPD installation already!

More articles in the Archive →