Passenger

Passenger Logo

From the beginning, one of the weaknesses of Ruby on Rails has been the complexity of deploying a Rails application. Deployment was not difficult once you had done it once or twice, but it required several extra steps, learning about additional technology (like Mongrel or FastCGI), having a fair amount of server admin skills and a bit of patience. Most significantly, deploying a Rails application was much harder than deploying a PHP application.

With PHP, you can just drop your application files on the server, configure Apache to server up those files and you are done! It is possible to do this thanks to a module for Apache that allows it to serve up PHP files without needing a “handler” in between. This Apache module can be referred to as “mod_php”. This has been one of PHP’s strengths and one of it’s advantages over Rails.

Last week that all changed when Passenger was released by Phusion. Passenger is also referred to as “mod_rails” because, like mod_php (and mod_perl, mod_python, etc.), it is a module that allows Apache to serve up Rails applications without needing a handler like Mongrel or FastCGI. Once Passenger is installed, deploying a Rails application becomes as easy as PHP—simply drop files on the server and configure Apache to serve them.

It is notable that it is nicknamed “mod_rails” and not “mod_ruby”. mod_ruby is a different project whose development seems to have stalled in mid-2006. The difference also indicates that Passenger currently works only with Rails and not with other Ruby frameworks (like Merb or Camping).

Phusion made Passenger very easy to install and set up. Ryan Bates at Railscasts has a demonstration of how easy it is. Notice that he does not launch WEBrick, start up Mongrel or use FastCGI, he just restarts Apache and the application becomes available!

This is the first release of Passenger, so it is very possible that there will be bug fixes and improvements in the near future. There has already been some discussion about how to reduce the memory usage of Passenger (currently twice the memory usage of a single Mongrel instance). It has also been noted that if an application sits idle for a while it takes a little while for it to load again (I find that FastCGI does this too). Fixes, work-arounds and good advice will certainly be surfacing over the next few weeks as developers test it out on a wide range of web applications and server set ups.

One thing is for sure: the Ruby on Rails community is excited at the potential Passenger has for making deployment easier and thereby lowering a key barrier to entry for new developers. PHP took off once it became an Apache standard. Now Rails is poised to do the same.

Leave a Reply