[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

require 'socket' returns false in windows?

David Miller

7/8/2008 8:36:00 PM

I have two windows computers that return false when the following
statement is executed:

require 'socket'

Both computers are XP loaded with 1.8.6 via the one click installer. On
one of the windows machines I am able to disable the firewall which
makes no difference. The other windows machine does not have a local
fire wall. I know that require is finding the file, because I get a
completely different message if I require something that doesn't exist.
I am wondering if this is an initialization error, or a false false.

I also have a Linux machine. On my Linux Machine, the statement returns
true as expected.

What can I do to figure out what is causing this?

Thanks

Dave M
--
Posted via http://www.ruby-....

2 Answers

Joel VanderWerf

7/8/2008 8:42:00 PM

0

David Miller wrote:
> I have two windows computers that return false when the following
> statement is executed:
>
> require 'socket'
>
> Both computers are XP loaded with 1.8.6 via the one click installer. On
> one of the windows machines I am able to disable the firewall which
> makes no difference. The other windows machine does not have a local
> fire wall. I know that require is finding the file, because I get a
> completely different message if I require something that doesn't exist.
> I am wondering if this is an initialization error, or a false false.
>
> I also have a Linux machine. On my Linux Machine, the statement returns
> true as expected.
>
> What can I do to figure out what is causing this?

It just means that socket has already been loaded:

$ RUBYOPT="" ruby -e 'p require("socket"); p require("socket")'
true
false

(I had to clear RUBYOPT to show this because otherwise gems was
apparently loading socket.)

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

David Miller

7/8/2008 9:26:00 PM

0

That was it.

Thanks Joel.
--
Posted via http://www.ruby-....