Require 'socket' returns false in windows?

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

David M. wrote:

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.)

That was it.

Thanks Joel.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs