Sorry to reply to my own reply except that I got it working. It turns out,
it couldn't create the UnixServer object because apache didn't have the
sufficient permissions to do so.

Thanx for you help

Steve Tuckner

-----Original Message-----
From: Steve Tuckner 
Sent: Thursday, July 19, 2001 9:57 AM
To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18124] Re: IOWA newbie question


When I put in the changes into httpd.conf as you suggested, I get this error
when running guestbook.rb

listening on c:\temp\iowa_guestbook
/d/A/Ruby/lib/ruby/site_ruby/1.6/iowa.rb:79:in `accept': The connection was
abor
ted (Errno::ECONNABORTED)
        from /d/A/Ruby/lib/ruby/site_ruby/1.6/iowa.rb:79:in `run'
        from guestbook.rb:33

I put in a log message in iowa.cgi to print out what it gets passed when
accessing http://localhost/iowa/guestbook and this is what I got:

url = '/iowa/guestbook', params = ''

Any ideas?

Steve

-----Original Message-----
From: Avi Bryant [mailto:avi / beta4.com]
Sent: Wednesday, July 18, 2001 7:07 PM
To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18078] Re: IOWA newbie question


On Thu, 19 Jul 2001, Steve Tuckner wrote:

> So I go into the examples/guestbook directory and run ruby guestbook.rb.
It
> starts up and runs. Wonderful. I then copy the iowa.cgi into the
> apache/cgi-bin directory. Then I go to my browser and type
> http://localhost/cgi-bin/iowa.cgi <http://localhost/cgi-bin/iowa.cgi>  and
> then what? -- ?name=guestbook, I have no idea.

You have to map a url pattern ending in /iowa/ to iowa.cgi.  Off the top
of my head, you do something like

Action iowa /cgi-bin/iowa.cgi
<Location /iowa>
SetHandler iowa
</Location>

And then you would access

http://localhost/iowa/guestbook

I think the iowa.cgi file has instructions in it.

> Also how do you kill the ruby guestbook.rb? I tried Control-C,
> Control-Break, neither worked. I then just exited the command window. Then
> when I tried to restart it, it said c:\Temp\iowa_guestbook address in use.

Hmmm... Control-C works on unix.  You'll need to delete that temp
file; perhaps you could set up a .bat file
that deleted it before every run?  Sorry, that's a bit cludgy...

Avi