From: Paul Lutus Date: 2006-09-21T10:55:05+09:00 Subject: Re: super simple serving of ruby pages Jonathan Denni wrote: > Franå·½ois Montel wrote: > >> Got it. That works, thanks, Paul, and Jan, for your patience with my >> ignorance. > > It seems like I am at the same level as your daughter [although a whole > 9 years older] and am trying to do the same thing you are. I could not > get anything working from what I gathered in this thread, but it seems > you have. Can you tell me what you ended up doing so I can do that too? It's very simple, really. Apache requires that executable pages (pages that have to be processed by an interpreter like Ruby) by placed in a special directory. The default for this is usually /sitedirectry/cgi-bin. Write an ordinary Ruby script, but make sure the first thing it prints is a CGI header, like this: print "Content-type: text/html\r\n\r\n" After this first line, just output HTML, as in my prior example, and the page will appear to all intents and purposes as though it contains the text it is printing. Therefore your Ruby code decides what the page content is, and it is obviously dynamic. A Ruby interpreter must be installed on the server machine. Apart from that, it should work without any fuss. -- Paul Lutus http://www.arachnoid.com