Passenger (mod_rails for Apache) launches
Posted by David April 11, 2008 @ 05:27 PM
The guys at Phusion has finally wrapped up Passenger, their mod_rails-like module for Apache. It’s looking like a great, easy solution for people who want a more PHP-like deployment story. Just dump your files in a directory setup with a vhost and off you go. Touch tmp/restart.txt and the application is restarted. Doesn’t get much simpler than that.

Thanks David for the plug :-) and we’re looking forward to playing a game of starcraft with you at Railsconf.
Hongli, if you’re reading this, I’ll be at the local pub at nine. Put on your good shoes, it’s celebration time! ;-)
There goes my job as Rails Deployment Engineer, but now I can start my own Rails hosting company!
On a more serious note, awesome work Phusion!
PS. The game of starcraft should be put up on a projector at Railsconf!
congrats guys and thanks, I’m really looking forward to trying to this out. I can finally go back to coding and not worry as much about admin.
Yeah great work guys, let’s see how it performs. Surely it will change our little Rails world…
Kudos to the Phusion guys. They even cared about the dreaded shared hosting situation on everybody running as the same user: mod_rails will pick the user assigned for the config/environment.rb of the application and will never allow to run as root.
This is very exciting. I find deployment to be the single ugliest part of Rails development. Congrats, and thanks!
Would someone be able to give those of us who aren’t familiar with Passenger a quick rundown on the advantages/disadvantages of Passenger vs. Mongrel? I wasn’t able to find anything explicit on Passenger’s site.
Aside from the “OMG so simple!” install instructions, that is. wink
Slick, Slick, Slick.
This looks exactly like what I’ve been looking for. Because before, I had to do this to set up typo to run under apache. And that took days of hacking around
http://blog.folkwolf.net/pages/installation/
Will it blend?
Will it blend?
What about a Windows version?
Thomas
Can I slap the next person to bring up anything about Windows?
Nice, I guess this will bring a whole new level of RoR shared-hosts :) And in such it will make RoR a lot popular platform.
Awesome work.
About mongrel vs passenger – passenger beats mongrel clusters to every single thingie so far. Although various hidden issues may arise.
The only downside so far seems to be subtle incompatibilities with mod_rewrite and mod_alias.
toupeira: The incompatibilities are for a reason, and is not Passenger’s fault. However, there is a configuration option to disable Passenger’s workaround, though it’ll mean you’ll have to manually fix any incompatibilities that mod_rewrite causes (or easier: just delete your .htaccess).
@toupeira – can you please elaborate or post a link to a discussion of these issues. even if they are minor, I’d like to avoid and instances of banging my head against a wall.
Now, I’m happy inside. I think I know why.
mark: it’s documented in the users guide.
Umm what about file uploads/rails ‘hanging’?? Does mod_rails spin up rails before or after the request is complete?
Hi Adam,
Passenger is clever enough to manage the railsprocesses for you so when it infers that it needs to spawn another process based on the site traffic, then it’ll do that (but no more than your configured RailsMaxSize).
I’m not sure what you mean with spinning, but if you’re referring to Passenger being able to manage rails processes concurrently (and effectively solving the ‘hanging/upload’ problem) then the answer is yes.
Looks great but what the hell is “Ruby Enterprise Edition” (site not there at the time)? Is it a FOSS version of Ruby with a license fee or something?
Looks great but what the hell is “Ruby Enterprise Edition” (site not there at the time)? Is it a non FOSS version of Ruby with a license fee or something?
Hi Patcito,
The release of Phusion Passenger has taken a lot of time and energy, so much that haven’t had the chance to be able to elaborate on that with the release of Passenger.
However, I’d like to take the opportunity here to do so in a concise manner ;-)
Ruby Enterprise Edition is our Ruby branch containing our copy-on-write garbage collector optimization for MRI. The idea is that this branch will eventually be merged back upstream, but for the time being, also considering Railsconf, we’re presenting it as Ruby Enterprise Edition. It will be made available for download in the near future under the Ruby license (open source).
As for the name, we’ll elaborate more on that at Railsconf, as I assure you that we’re well aware of it’s ‘quirks’ ;-)
I’m looking forward to trying to this out! Thanks for this!
Congrats on the release, awesome work.
A note on the Ruby enterprise edition name; Shouldn’t an enterprise class interpreter require more memory (and be much slower) than other non enterprisey counterparts?
Installed it and it works like a charm! Easy and straight forward installation. Almost too easy…
I’m currently using it with “sub URIs” configuration but is it also possible to use passenger with “userdir” installations? That is such that pages can be accessed with ~uid in the URI path?
Hi oldmoe,
Haha, that’s an excellent question actually ;
)... Well, let’s just say that this will be the exception to that thought ;)Ruby Enterprise Edition should be considered as being a superset of Ruby where it’s also worth mentioning that its GC optimization feature can be toggled on/off during runtime :-), but again, we’ll elaborate more on this at Railsconf or maybe earlier if our schedule would allow for it.
Good to hear that it’s working well for you kmart, and concerning your question, we would need to investigate if people really find having such a feature desirable.
Also, since it’s open source, people may already be working on it (and we know of some VERY influential people who I’ll leave unnamed for the time being that are working on Passenger :-) as well).
Lastly, nearly all hosting companies offer virtual hosts nowadays, so again, we really would need to assert the need for such a feature. The thought behind this is YAGNI (You Ain’t Gonna Need It) in order to prevent a possible feature creep.
Hope that answers your question (and it is once again that I catch myself working during the weekend after stating that I wouldn’t :S ;-) )
I am totally thrilled with Passenger so far. I had it up and running in no time and have converted all of my small sites to it already. So far, it’s been everything they’ve said and more! Wonderful stuff!
Do the Passenger guys know when their patches will make it into Ruby proper? I think there will be a lot of resistance to running a non-standard Ruby for a lot of folks. But if the patches do make as big of a difference as is claimed, it’ll be hard to resist.
Cheers, John
Took me a while, but I finally have it working on Mac OS X Leopard. I wrote up a little how to here:
http://benr75.com/articles/2008/04/12/setup-mod_rails-phusion-mac-os-x-leopard
Ran in to a problem on suse 10.1 with apr headers :
/usr/include/apache2/ap_config.h:26:23: error: apr_hooks.h: No such file or directory /usr/include/apache2/ap_config.h:27:32: error: apr_optional_hooks.h: No such file or directory
Solution :
cd /usr/include/apr-1/ cp *.h ../apache2
Hi John,
I’m not at liberty to fully disclose on that, but I can however say that Ruby Enterprise Edition is an optional superset, that is, it’s not mandatory for using Phusion Passenger.
Hey BenR, thanks for writing this up – I’m going to try using this to deploy to my MacBook tonight.
If it helps anyone, I documented a mod_rails/typo install on ubuntu at:
http://macksmind.net/articles/2008/04/13/installing-typo-blog-engine-and-mod-rails-for-multiple-accounts
I’ll try to remember to add this to the issue tracker later today:
gem installation fails on Solaris10/SPARC since <sys /> needs either _XPG4_2 or _KERNEL for definition of the structure members required by native_support.c (lines 63-65, 107-109, 120).
native_support.c:63: error: structure has no member named `msg_control’
This is an awesome alternative, particularly for smaller deployments. I can still see the value in a Mongrel cluster with mod_proxy_balancer for larger sites, but I can’t begin to imagine how much easier this is going to make life for shared hosts. I had it up an running on a Linux box I test with in 10 minutes flat.
I just deployed passenger for one of my smaller sites and it was very easy. So far so good…everything has been working great.
This is definitely a huge step in making deployment of rails apps easy.
The biggest obstacle I’ve had in trying to use Rails to build apps for my customers has been in the deployment because most servers do not, by default, support Rails. Just about every host seems to support PHP and now that we have Passenger I expect that Rails will eventually be supported by most hosts as well.
A big thanks for the Phusion guys who have made this possible!!
Wow, I just deployed some of my sites with mod_rails and the only thing that i could say: so fkg** awesome!
Thanks to the Phusion guys!
Hi all! Please help to solve this problem. When mongrel was changed by passenger, there was rise following error: ActionView::TemplateError (wrong number of arguments (3 for 2)) on line #3 of rest_objects/edit.html.erb
line 3 in edit.html.erb: <= render :partial=>‘form’>
It links to _season.html.erb on the line <=f.date_select :start_date> So perhaps problem is somewhere in date_select PS: in this view I also use attribute_fu PPS: run on mongrel and it also works well.
Fantastic!
This is amazing piece of software! It makes Apache + Rails so superior and easier_to_set_up than Apache + PHP. Everything works out of the box, autmomatic restart feature is just great and dropping user permissions is huge step forward in security on shared hosting installations. That is so-so-cool and I’m really excited about this product!
Respect, Phusion!
H.
k. where’s the basic basic instructions. like, for someone who’s never even used apache before (me). do I need to first install apache2, then passenger?