From: Noah Date: 2003-11-17T10:23:42+09:00 Subject: Re: TCPSocket error "Chris Reay" wrote in message news:7652139e.0311091842.1d170043@posting.google.com... > "Noah" 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 Thanks, but that didn't help. The error happens on the TCPSocket.new command.