Experience with mod_rails

Jeff Mancuso November 17th, 2008

Deploying an application using mod_rails (Phusion Passenger) is like magic.

$ gem install passenger
$ passenger-install-apache2-module

Install the gem, load the Apache module – everything “just works”. It’s ridiculously easy.

I want to fall in love with mod_rails. I’m ecstatic somebody is helping novices configure Apache and trying to make everyone else’s life slightly easier. Too many man months have been spent reading up on deploying a mongrel cluster with proxy_balancer. Passenger tries to make everyone’s life much much easier, but it goes too far. If you’re doing anything with your Apache instance that isn’t purely confined to your Rails sandbox, save yourself some time and heartache and don’t even bother with Passenger. It’ll let you down.

Rails succeeds in achieving a nice balance between Magic and Pragmatic. Rails allows an enterprising developer to peek behind the curtains and make something “custom” happen. Passenger doesn’t. For instance: the inability to get well defined behavior with mod_rewrite or mod_alias is infuriating. Equally annoying is the inability to turn off mod_rails for a given virtual host. Want to run a piece of PHP on your site or have a sub-uri host your PHP based forum? Good luck. Have a low traffic app on your domain that you’d like to use Passenger for while serving your main site with mongrel. Good luck.

Rails developers might not be the most hardcore bunch out there, but they are characteristically willing to look outside their sandbox in order to get something Better done more Quickly. Denying them the ability to adequately configure their application using ‘legacy’ methods isn’t going to get you very far. I’ve tried to deploy Passenger twice now in the past 3 months, and have officially thrown in the towel.

Update 6/29/09: These concerns are now moot. mod_rails plays nice with mod_rewrite with the high performance option. Long live mod_rails!

Tags: , ,

3 Responses to “Experience with mod_rails”

  1. Phill Kenoyer Says:

    Strange, I’m running Passenger on the same box as PHP, and it’s running just fine. Many months with no problems. I’m also running three mongrels and a thin on the same box. I’m using Nginx on another box to point to them instead of using Apache’s mod_proxy. But it’s working fine for me.

    I’m also running Passenger and PHP5 on my Mac with Apache2. it’s running fine too. Oh, and I’m doing Merb with Rack support on my Mac and running my Merb apps on my server with Passenger.

  2. Jeff Mancuso Says:

    I tried endlessly to get a php dokuwiki running at a sub-url within a rails app, and it would never properly pick up the index page or allow mod_rewrite to rewrite the URLS so that our pre-existing [googled indexed] “pretty” urls would work. In addition, if I had mod_rewrite pass off requests to a particular uri/path to a proxy_balancer group while mod_rails was on, mod rails would load and try to serve anyways – with no obvious way to disable it.

    Who knows! The “benefits” were largely in ease of use. When those faded, I wondered how much utility was left over – and didn’t find much.

  3. Phill Kenoyer Says:

    Oh, by sub-url, you mean sub-directory. IE: expandrive.com/dokuwiki/

    I was thinking sub-domain when you said sub-url.

    Yeah, I’ve never tried to run PHP code inside of a Rails app.

Leave a Reply

Subscribe:

Add to Google
RSS
Try ExpanDrive

If you’ve heard of SSH then you need ExpanDrive.