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.

Posted in Documentation, Launches | 39 comments

Comments

  1. Ninh Bui on 11 Apr 17:49:

    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! ;-)

  2. Codafoo on 11 Apr 18:47:

    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!

  3. james on 11 Apr 18:58:

    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.

  4. Jaime Iniesta on 11 Apr 19:42:

    Yeah great work guys, let’s see how it performs. Surely it will change our little Rails world…

  5. AkitaOnRails on 11 Apr 19:44:

    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.

  6. Rob Morris on 11 Apr 19:45:

    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

  7. Matt Rose on 11 Apr 20:02:

    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/

  8. Jose Fernandez on 11 Apr 20:28:

    Will it blend?

  9. Jose Fernandez on 11 Apr 20:28:

    Will it blend?

  10. Thomas on 11 Apr 21:01:

    What about a Windows version?

    Thomas

  11. RailsWTF on 11 Apr 21:09:

    Can I slap the next person to bring up anything about Windows?

  12. Artūras Šlajus on 11 Apr 21:48:

    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.

  13. toupeira on 11 Apr 22:56:

    The only downside so far seems to be subtle incompatibilities with mod_rewrite and mod_alias.

  14. Hongli Lai on 11 Apr 23:50:

    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).

  15. mark on 11 Apr 23:50:

    @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.

  16. Tamer Salama on 12 Apr 00:46:

    Now, I’m happy inside. I think I know why.

  17. Hongli Lai on 12 Apr 00:46:

    mark: it’s documented in the users guide.

  18. Adam on 12 Apr 00:46:

    Umm what about file uploads/rails ‘hanging’?? Does mod_rails spin up rails before or after the request is complete?

  19. Ninh Bui on 12 Apr 01:08:

    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.

  20. Patcito on 12 Apr 02:24:

    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?

  21. Patcito on 12 Apr 02:24:

    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?

  22. Ninh Bui on 12 Apr 02:50:

    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’ ;-)

  23. Tim on 12 Apr 11:26:

    I’m looking forward to trying to this out! Thanks for this!

  24. oldmoe on 12 Apr 15:28:

    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?

  25. kmart on 12 Apr 17:58:

    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?

  26. Ninh Bui on 12 Apr 18:58:

    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 ;-) )

  27. John Gibbons on 13 Apr 02:27:

    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

  28. Ben Reubenstein on 13 Apr 05:37:

    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

  29. Daniel Wijnands on 13 Apr 07:46:

    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

  30. Ninh Bui on 13 Apr 13:00:

    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.

  31. DJ on 14 Apr 01:38:

    Hey BenR, thanks for writing this up – I’m going to try using this to deploy to my MacBook tonight.

  32. Mack Earnhardt on 14 Apr 03:34:

    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

  33. martin on 14 Apr 12:33:

    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’

  34. Ernie on 16 Apr 14:14:

    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.

  35. Francois on 21 Apr 18:45:

    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!!

  36. toño on 21 Apr 23:30:

    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!

  37. Michail on 22 Apr 21:47:

    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.

  38. Hubert Łępicki on 24 Apr 13:31:

    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.

  39. Chris on 09 May 17:50:

    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?