How is rails different from PHP from Apache's view?

PHP runs on most servers as an Apache module. That means you can get PHP cobbled into Apache with little effort and every Web host on the planet does this for you. Ruby does not run (well) as an Apache module. That means you have to manage the efficiencies of instantiating the Ruby interpreter as infrequently as possible. This is normally done by running Rails inside mongrel as a long running process.

The deployment difficulty is simply that of taking the mongrels down and pointing them at new code. Once you’ve done a few deployments, it will seem a lot easier. Oh, and Capistrano make it almost automatic for many cases.

Is it possible to make an Apache module for rails? If so, why hasn't it be made yet? If not, why?

mod_ruby is not completely reentrant and that makes it problematic for long running Web applications like Rails. There may be other issues I'm not aware of, but I've not heard much about people using mod_ruby.

Yes.

But some web hosting servers like Dreamhost don't support mongrel.:frowning:

I don't host anything on Dreamhost, but a quick Google turned this up:

http://discussion.dreamhost.com/showflat.pl?Board=forum_programming&Number=96032

Maybe it's of some help.

One good reason not to use a shared host for rails hosting, especially the really cheap ones (except maybe one or two exceptions that confirm the rule).

Best regards

Peter De Berdt