Forum: Ruby Apache with Ruby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dd99c457977513ed8567f1e81e5a7876?d=identicon&s=25 Henry Ortega (Guest)
on 2006-04-03 02:57
(Received via mailing list)
I am really new to Ruby. I have just installed Ruby on my Linux box and
it
works fine. I need Apache to recognize Ruby scripts and interpret them.
Is
mod_ruby the only way to do it?
E34b5cae57e0dd170114dba444e37852?d=identicon&s=25 Logan Capaldo (Guest)
on 2006-04-03 03:06
(Received via mailing list)
On Apr 2, 2006, at 8:54 PM, Henry Ortega wrote:

> I am really new to Ruby. I have just installed Ruby on my Linux box
> and it
> works fine. I need Apache to recognize Ruby scripts and interpret
> them. Is
> mod_ruby the only way to do it?

You can of course use the regular CGI methods. I.e. start your files
with
#!/path/to/ruby
... script ...

And configure apache to recognize them as cgis (makr them as
executable, put them in cgi-bin or use httpd.conf or  .htaccess to
configure apache to recognize .rb files as cgis)
430ea1cba106cc65b7687d66e9df4f06?d=identicon&s=25 David Vallner (Guest)
on 2006-04-04 22:34
(Received via mailing list)
DÅ?a Pondelok 03 Apríl 2006 03:03 Logan Capaldo napísal:
> ... script ...
>
> And configure apache to recognize them as cgis (makr them as
> executable, put them in cgi-bin or use httpd.conf or  .htaccess to
> configure apache to recognize .rb files as cgis)

I'd use mod_fastcgi instead of mod_ruby if you want to avoid the CGI
overhead.

David Vallner
40b8ef8518829533bc6969596e211275?d=identicon&s=25 unknown (Guest)
on 2006-04-04 23:42
(Received via mailing list)
> I'd use mod_fastcgi instead of mod_ruby if you want to avoid the
> CGI overhead.

Maybe you mis-worded that. Of course, the whole point of using
mod_ruby is to avoid the overhead of using plain old CGI. :)
40b8ef8518829533bc6969596e211275?d=identicon&s=25 unknown (Guest)
on 2006-04-04 23:42
(Received via mailing list)
Just curious David, why choose mod_fastcgi over mod_ruby?
Bd0203dc8478deb969d72f52e741bd4f?d=identicon&s=25 Daniel Baird (Guest)
on 2006-04-05 05:44
(Received via mailing list)
On 05/04/06, john_sips_tea@yahoo.com <john_sips_tea@yahoo.com> wrote:
>
> Just curious David, why choose mod_fastcgi over mod_ruby?



afaik:

mod_ruby lives in every instance of the server -- so if you have five
apache
processes serving ruby stuff, and five processes serving static content,
you
have the ruby interpreter loaded into memory ten times over.

fast cgi gives you the benefit of a long running ruby interpreter (ie
unlike
normal cgi, where the ruby interp has to start up fresh for every
request),
but still keeps ruby out of the apache footprint, so the Apache process
that
is serving your fav_icon doesn't pay the ruby memory tax.

that's my impression at least -- but I have been humbled in these forums
before, and probably will be again :)

;Daniel


--
Daniel Baird
http://danielbaird.com (TiddlyW;nks! :: Whiteboard Koala :: Blog ::
Things
That Suck)
[[My webhost uptime is ~ 92%.. if no answer pls call again later!]]
430ea1cba106cc65b7687d66e9df4f06?d=identicon&s=25 David Vallner (Guest)
on 2006-04-09 03:41
(Received via mailing list)
DÅ?a Utorok 4. Apríl 2006 23:38 john_sips_tea@yahoo.com napísal:
> Just curious David, why choose mod_fastcgi over mod_ruby?
>

For a very anecdotal argument, I also think I recall someone mentioning
mod_ruby using worker threads also causes frameworks that aren't
threadsafe
(I think Rails is one) to break down in tears.

David Vallner
110a70d754732299d62611743553e05d?d=identicon&s=25 Brian McCallister (Guest)
on 2006-04-12 18:44
(Received via mailing list)
I suggest considering mod_fcgid ( http://fastcgi.coremail.cn/ ) for
fastcgi in apache 2.0/2.2. It is maintained and works very well.

-Brian
40b8ef8518829533bc6969596e211275?d=identicon&s=25 unknown (Guest)
on 2006-08-03 14:21
(Received via mailing list)
Whoops. Sorry -- I see what you were saying now.
This topic is locked and can not be replied to.