Installing Phusion Passenger on a cPanel server

A while back, Phusion released a product called Passenger, effectively mod_rails for Apache. The idea is that rather than having to do a lot of the usual manual setup work when running a Rails app (using mod_proxy to point at mongrel_clusters, etc.), you can just have them run automatically via Apache, the same way PHP apps will. Today I finally managed to get it running and while the solution was simple, it's hard to find.

My problem was that I have WebHostManager/cPanel running on my server, which installs Apache for you. This has the common trade-off of being very convenient, but reducing your options for true customization. So when you run:

passenger-install-apache2-module

the installer will tell you to install the httpd-devel library via 'yum install httpd-devel'. Trying that just had yum return a 'nothing to do' response because it had decided there wasn't an httpd-devel package to be found.

I've had a couple of half-hearted attempts in the past few months trying to find an rpm for httpd-devel to match the version of Apache cPanel currently installs (2.2.9) to no avail for my CentOS box. Today I tried a bit harder while setting up a new server and found the solution!

It turns out (thanks to this thread on the cPanel forums) that cPanel excludes all yum packages for httpd to avoid conflicts, although the tools are actually installed when cPanel installs Apache. So they're there, Passenger just doesn't know that.

The cPanel thread provided the solution to this problem by basically pointing the Passenger installer at apxs:

APXS2=/usr/local/apache/bin/apxs passenger-install-apache2-module

Now the required dependencies checks should pass and hopefully all will be fine. I did however hit one more problem, with a complaint along the lines of  "'apr_ino_t' does not name a type". Luckily this is also solved by just pointing the installer at apr-1-config, so you end up with:

APXS2=/usr/local/apache/bin/apxs APR_CONFIG=/usr/local/apache/bin/apr-1-config passenger-install-apache2-module

Thanks to a blog post from Peter Cooper for that solution, which it turns out has the previous solution as well. If only I'd found that blog post before! Anyway, in the same spirit of Peter Cooper's post of this problem not being documented widely enough (or at all), I thought I'd better get it written down here too, if nothing else but for my own reference.

Ruby on Rails 2.0 is go

The official Rails blog has the announcement that Rails 2.0 is done and great news that is too. Now I just need to find the time to eventually catch up on all the changes and start playing with it!

PHP better than Ruby (on Rails)?

Not quite but Derek Sivers, an early proponent of switching to Rails for large-scale websites, has written a post on his O'Reilly blog about why he just gave up on 2 years' work in Rails on his CD Baby project to switch back to PHP.

It's a very sensible article looking at the fact that Rails isn't always the answer, much as it may pain us to admit, and that when PHP (or any other language) would actually be easier to use, we just should.

That said, I haven't been tempted back to PHP for anything just yet :)

We're hiring

At Gottabet we're looking for a 'web application designer' to join the team. The job entails a range of web dev, from helping design various sections/features of the website to implementing them in HTML and CSS.

There's a full job spec on the website, so if you're a developer who's big on web standards looking for an exciting, fast-paced job working on a big social website, check out the job spec and get in touch with Wim and Bertrand (email addresses on the linked page).

It lives!

The top-secret project I've been working on since moving down to London at the end of October had a still-quite-secret launch late last week and now we're ready to tell a few more people.

Without further ado, I present Gottabet.com!

Gottabet.com homepage

Gottabet.com is a social networking site where people exchange challenges and bets on any event they can think of, from "I bet it'll be a white Christmas this year" to "Nobody can catch a pigeon" (thanks to my brother, Christian for posting those two).
I say a 'still-quite-secret' launch last week, but only in as much as it was limited to a small number of people. The launch itself was far from secret, held in a pub where we got drunk people to take part in silly bets and dares. The result was a set of photos that I've added to flickr under a new Gottabet-specific account. There are some pretty funny pictures (especially the two people racing to fit the most Maltesers in their mouth), so check 'em out.
On a more techy note of possible interest, the site has been developed entirely in Ruby on Rails by a team of 5 developers (including me, though I've worked much more on the HTML/CSS side of things). The site was built in around 6 months, which is even more impressive when you find out that for the first few months there was only one developer (Peter) working on it. The other three (Rich, Ken and Phil) joined within a few weeks of each other around September time and I joined at the very end of October.

The team is completed by (and indeed started with) two Belgians: the founders Wim Vernaeve and Bertrand Bodson. They came up with the idea around a year ago and have gone from simple idea to launched website in that time. There's a team photo on the 'about Gottabet.com' page. Mini-profiles of each of us will be added soon too.

To get you started, have a look at my latest bet: I bet at least one of the presents I've ordered won't arrive in time. It's just for peanuts, no money needed ;)

 1 2 3 … 7 Next →

About

User