I'm trying to get Webrick running on Ruby 1.8.1/OS X 10.3, but I'm 
experiencing some problems getting even the simplest example to work:

#!/usr/local/bin/ruby
require 'webrick'

s = WEBrick::GenericServer.new( :Port => 2000 )
trap("INT"){ s.shutdown }
s.start{|sock|
   sock.print(Time.now.to_s + "\r\n")
}

This produces the following error when I hit localhost:2000:

david$ ./daytime_server
[2004-01-13 23:31:32] INFO  WEBrick 1.3.1
[2004-01-13 23:31:32] INFO  ruby 1.8.1 (2003-12-25) [powerpc-darwin]
[2004-01-13 23:31:32] INFO  WEBrick::GenericServer#start: pid=8077 
port=2000
[2004-01-13 23:31:38] ERROR SocketError: getnameinfo: System error
         /usr/local/lib/ruby/1.8/webrick/server.rb:147:in `peeraddr'
         /usr/local/lib/ruby/1.8/webrick/server.rb:147:in `start_thread'
         /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start'
         /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'
         /usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start'
         /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each'
         /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start'
         /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'
         /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'
         ./daytime_server:6

Anyone got a clue?
--
David Heinemeier Hansson.
http://www.loudthinking.com/ -- Broadcasting Brain