# Require 'socket' returns false in windows?

**URL:** <https://www.ruby-forum.com/t/require-socket-returns-false-in-windows/142530>\
**Category:** Ruby\
**Created:** [July 8, 2008, 10:39pm UTC](https://www.ruby-forum.com/t/require-socket-returns-false-in-windows/142530 "2008-07-08T22:39:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dgm](https://www.ruby-forum.com/u/dgm)\
**Post date:** [July 8, 2008, 10:39pm UTC](https://www.ruby-forum.com/t/require-socket-returns-false-in-windows/142530/1 "2008-07-08T22:39:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dgm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dgm](https://www.ruby-forum.com/u/dgm)\
**Post date:** [July 8, 2008, 10:46pm UTC](https://www.ruby-forum.com/t/require-socket-returns-false-in-windows/142530/2 "2008-07-08T22:46:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dgm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dgm](https://www.ruby-forum.com/u/dgm)\
**Post date:** [July 8, 2008, 11:30pm UTC](https://www.ruby-forum.com/t/require-socket-returns-false-in-windows/142530/3 "2008-07-08T23:30:05Z")

</div>

That was it.

Thanks Joel.
