It’s just data

modrails: easy (if you are root)

Took a look modrails.  First impressions: easy to set up; not sure what the target market is for this.

Here’s the setup for Ubuntu Hardy Heron:

sudo gem install passenger
sudo apt-get install build-essential apache2-mpm-prefork apache2-prefork-dev
sudo apache2ctl restart
sudo passenger-install-apache2-module

Note that at this time passenger requires prefork.  worker is not currently supported.

You have two choices when deploying: deploying to a virtual host’s root, or deploying to a sub URI.  Both require modifying httpd.conf, having update access to the document root and restarting Apache.

At this point, I start to wonder what the point is.  There already are plenty of options available to people with root access to their servers.  What I would think would be most useful is something that targeted Apache shared hosts.  I should be able to put something in my /home/rubys/public_html/.htaccess (or /home/rubys/Sites/.htaccess on a Mac) to say that the depot directory is a Rails application, and access it as http://localhost/~rubys/depot/.  But instead I get

[Mon Apr 28 10:53:04 2008] [alert] [client] /home/rubys/public_html/.htaccess: RailsBaseURI not allowed here

The point is first of all that it’s easier to set up and maintain, and secondly that you can host more smaller Rails applications on the same server while using less resources because you don’t have to keep mongrels or fcgi dispatcher processes running all the time.

Posted by Thijs van der Vossen at

I set it up on my web server recently, and one thing that pleasantly surprised me is that it didn’t seem that I had to set RailsBaseURI at all.  This is probably because I already had all my Rails apps set up to run on subdomains, but I imagine that for a lot of shared hosting users this is already the case anyway.  Dreamhost, for example, lets you set up as many subdomains as you want, which means that if they were running Passenger, people could just deploy their Rails apps to existing vhost roots, and it would automatically detect and run them.

Posted by Nat Budin at

Also, you don’t really need to restart Apache all the time once your stuff is configured. There is this hack about touching $RAILS_ROOT/tmp/restart.txt, which seems to work nicely.

Posted by Martin Probst at

Sam Ruby: modrails: easy (if you are root)


Excerpt from at

As Martin said you can restart your application by touching tmp/restart.txt,  I wouldn’t personally describe it as a hack, but you don’t need to be root.

It sounds like you’ve got some good ideas for the vhost support, I’d put bugs into their tracker.  They’ve been pretty responsive with me so far.

Posted by Koz at

Just to pick up on your .htaccess remark. SwitchPipe supports that for deploying Rails (and non-Rails) applications in the way you suggest.

Posted by Peter Cooper at

28 mod_rails / Passenger Resources To Help You Deploy Rails Applications Faster

Passenger (often known as “mod_rails“) is an Apache module developed by Phusion, a small Dutch IT consultancy, that makes it easy to deploy Rails applications on Apache-based stacks. Passenger follows on well from the popular “No...

Excerpt from Ruby Inside at

Dreamhost is offering Passenger, you can use it on subdomains but not subdirectories, and it disables all mod_rewrites. Which means that I cannot use phpmyadmin on a Passenger enabled (sub)domain.
But they’re looking to fix that.

Posted by anonymous at

Phusion Passenger installed

I eventually decided to install phusion passenger for his simplicity on rails deployment. My first intention was to install Apache + Mongrel, but after reading Sam Ruby’s article and the following lines in this article I changed my mind:...

Excerpt from at

Add your comment