From: Robert Klemme Date: 2006-01-04T21:22:58+09:00 Subject: Re: Newbie tearing hair out page77.office@googlemail.com wrote: > dsymonds@gmail.com wrote: >> page77.off...@googlemail.com wrote: >> >>> So to my problem. I have created a 'helloworld' web page and >>> called it 'testcgi.rb'. I have put it in various directories, but >>> whenever I try to execute it as a web page on my localhost - it >>> just prints out the contents. I look at httpd.conf and tremble, >>> although I am not sure which is the right one. I have installed >>> 'instantrails' under c:\rubyrail >>> >>> Contents of testcgi.rb >> >> Chances are it just needs to be called "testcgi.cgi" (i.e. using the >> .cgi extension). This would be an Apache setup aspect. >> >> The code is fine, by the way, though standards-wise you'd be better >> using "\r\n\r\n" to end the HTTP headers, not just "\n\n". >> >> >> Dave. > > Thanks for the tip. I have had it called testcgi.cgi and I just get > it printed out, not executed. Once when I dealt with CGI scripts (a while ago) you had to create a directory called "cgi-bin" in the root of the web application and place your scripts there (with executable permissions). That was all that was necessary to make them executable as CGI scripts. Kind regards robert