"Noah" <noahd / juno.nospam.com> wrote in message news: 
> So the exact code is:
> 
> require "socket"
> t = TCPSocket.new('127.0.0.1', 'http')
> print t.gets
> t.close
> 
> with error:
> 
> 6sock2.rb:2:in `new': No such file or directory (Errno::ENOENT)
>         from 6sock2.rb:2

From the Pickaxe book, IO.gets ...

"The stream must be opened for reading or an IOError will be raised."

How about

print t.recv(1024)

That's what I use. Hth.

Chris