zerohalo wrote:

> 
> Paul Lutus wrote:
>> Just one question. Do you want the existing Web server to serve your Ruby
>> code, or do you require the server to be Ruby-based also?
>>
> 
> No, the server doesn't need to be Ruby-based. I could use lighttpd or
> apache to serve the code.
> 
>> If the former, you can tell Apache to serve Ruby scripts that contain the
>> usual CGI conventions. That seems simple enough. And it might not be what
>> you are asking for.
> 
> That's the part I'm missing. I find Apache extremely difficult to
> configure (beyond the basics). How would I tell Apache to serve Ruby
> scripts?

Others have offered good advice. The simplest way is to give the server what
it expects to see:

---------------------------------------

#!/usr/bin/ruby -w

print "Content-type: text/html\r\n\r\n"

print "<html><body><center><h1>Hello world!</h1></center></body></html>"

---------------------------------------

Put this file in a directory where executable content is expected to be,
like /serverpath/cgi-bin, and chances are Apache will treat it as you would
expect, without any special configuration.

-- 
Paul Lutus
http://www.arachnoid.com