mod_ruby and rails

mod_ruby should be okay if you’re only running one app.

jeremy

Having worked a lot on mod_perl, I always wondered why mod_ruby couldn’t do it for ruby/rails what mod_perl did to perl/cgi.

-Pratik

IIRC, Rails is known not to be thread-safe. I'm guessing a bit of rewriting might fix that, but given the volumes of "how to run apps quickly" methods that are already out there (fcgi, scgi, proxy to mongrel), most of which avoid the sorts of downsides that infested mod_perl (bloat, quirky apache integration, etc.), I'm not seeing the demand.

-faisal

most of which avoid the sorts of downsides that infested
mod_perl (bloat, quirky apache integration, etc.), I’m not seeing the

demand.

mod_perl is integrated with apache in a very very clean fashion. It isn’t quirky at all. I’d imagine that the following type of solution can be made with mod_ruby for rails deployment :

Just put following in httpd.conf

RailsApp /home/pratik/app/mycoolrailsapp StartServer 5 MaxServer 10 MinServer 8 RubySetEnv Mode Production

I guess this would be cool, quick and clean.

...in 2006. and how many bazillion lines of code had to pass through it to get it to that stage? and is mod_ruby there yet? i'm not saying mod_perl isn't a good solution for perl *now*, but there were some hiccups along the way, and perl has 10 years of practical and broad web development experience over ruby.

-faisal

Well, we gotta learn from their 10 years of experience in that case. I’m just saying that mod_perl might be the killer in rails deployment world for so called “Real world”, if done properly.

Oops…I meant mod_ruby.

...in 2006. and how many bazillion lines of code had to pass through
it to get it to that stage? and is mod_ruby there yet? i'm not
saying mod_perl isn't a good solution for perl *now*, but there were
some hiccups along the way, and perl has 10 years of practical and
broad web development experience over ruby.

Quirky maybe, but it's been stable for years. We are still using mod
perl 1.x with apache 1.3.x in very mission critical applications and
it just runs and runs.

No disagreement there.

I like mod_perl; I just don't get from "deploying on mod_perl is painless and cool, and has been since at least 2001" to "getting Rails to work on mod_ruby will be painless and cool" with any confidence.

I also don't believe that the work is in any sense impossible -- just cumbersome and possibly not worth the effort. This being a fairly participatory open source community, I wouldn't be surprised if someone goes ahead and does it. If they get it working I'd be happy to use it (for one thing I've been beating my head against Apache configuration since the days when it was a pile of patches against the NCSA server, and thus have a bit better intuition for getting it to do my bidding than I do for any other web server out there).

-faisal

> Quirky maybe, but it's been stable for years. We are still using mod
> perl 1.x with apache 1.3.x in very mission critical applications and
> it just runs and runs.

No disagreement there.

I like mod_perl; I just don't get from "deploying on mod_perl is
painless and cool, and has been since at least 2001"

Ha! The main reason we are still running an older version is because
the latest and greatest requires way too many code changes to make it
work. And there are plenty of gotcha's in mod perl along with a
fairly steep learning curve. You have to know exactly what version of
perl to use on what platforms. You might install the same thing on
linux and on freebsd it blows up. mod perl is just such a huge beast
and there is so much you have to know.

to "getting

Rails to work on mod_ruby will be painless and cool" with any
confidence.

Ya mod ruby would be great, but not necessarily any better than
something like mongrel. It might be better in the sense that it fits
into an existing environment that already uses apache, and it would
gain acceptance faster since people are familiar with apache and
apache modules. Personally, I think the first thing they should do is
make rails thread safe, because that opens up a whole new world of
possibilities. It's the best time investment they could ever make.