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)
···
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?
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
···
On Apr 2, 2006, at 5: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?
Dňa Pondelok 03 Apríl 2006 03:03 Logan Capaldo napísal:
···
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)
I'd use mod_fastcgi instead of mod_ruby if you want to avoid the CGI overhead.
David Vallner
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.
Just curious David, why choose mod_fastcgi over mod_ruby?
Whoops. Sorry -- I see what you were saying now.
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
···
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?
--
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!]]
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