Forum: Ruby 'Bad file descriptor'

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ec727e8238a8ebbfe98e84d4fafeb1d4?d=identicon&s=25 sean nakasone (Guest)
on 2007-03-19 22:20
(Received via mailing list)
Here's my very simple script to open a tcp port and write to it.

require 'socket'"", 9990)

The returns with:

cli.rb:3:in `initialize': Bad file descriptor - connect(2)
         from cli.rb:3:in `new'
         from cli.rb:3

The IP address is the PC that I'm running the script from.  I'm stumped
because if I replace "" with "localhost" or "", it
works.  Any suggestions?  I guess it could be a network security issue,
but how can I get around this?
43b0e87ab26acf70728003f0ad49a7f8?d=identicon&s=25 SHiBuMi (Guest)
on 2007-03-20 00:16
(Received via mailing list)
Yes, it's most probably a network security issue. Check your firewall
settings, and in order to be sure, disable your firewall and try while
firewall is disabled.
525128e48ca2b4c7fb6176ea166fccfd?d=identicon&s=25 Eric G. (gotskill10)
on 2007-09-25 03:34
Im actually getting this error now as well, and I tried disabling my
firewall, and disabling the settings on my norton AntiVirus.

Ive tried "localhost", <port> "", <port> "<computer name>", <port>

These all give the same errors. My mongrel servers work fine as usual. I
don't know why Im having so much trouble making a TCPSocket connection.

Any thoughts?
This topic is locked and can not be replied to.