From: Eric Hodel Date: 2003-09-22T11:05:20-07:00 Subject: Re: Webrick & CGI programs on WinXP --jKBxcB1XkHIR0Eqt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Austin Ziegler (austin@halostatue.ca) wrote: > I'm attempting to get ruwiki running under WEBrick on Windows XP. It's not > working, so I am attempting with a very simple CGI script. Well, that isn= 't > working, either. WEBrick has too many UNIX-isms to work well on a microsoft platform, I've got it working though. In cgihandler.rb add ``<< ::Conifg::CONFIG['EXEEXT']'' to line 21, so the correct name of the ruby interpreter is used. I had to add quotes to line 22 to use the correct path, because my ruby is installed in a non-standard location: CGIRunner =3D "\"#{Ruby}\" \"#{Config::LIBDIR}/httpservlet/cgi_runner.rb\"" I had to start WEBrick with a CGIInterpreter: s =3D WEBrick::HTTPServer.new(:CGIInterpreter =3D> "\"#{WEBrick::HTTPServle= t::CGIHandler::Ruby}\"") I was then able to use a CGI: s.mount("/hi", WEBrick::HTTPServlet::CGIHandler. "cgi.rb") where cgi.rb was: print "content-type: text/plain\r\n\r\n" puts "hi" --=20 Eric Hodel - drbrain@segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --jKBxcB1XkHIR0Eqt Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/bzngMypVHHlsnwQRAguUAKDI2Y+d5MKe3eCuKafkjSXtvioAYACeOCXB UXqMR/1FZfHVDT9V8mFrI5A= =ZHP3 -----END PGP SIGNATURE----- --jKBxcB1XkHIR0Eqt--