# Required module automatically including, except in Debian

**URL:** <https://www.ruby-forum.com/t/required-module-automatically-including-except-in-debian/90613>\
**Category:** Ruby\
**Created:** [March 30, 2007, 9:43am UTC](https://www.ruby-forum.com/t/required-module-automatically-including-except-in-debian/90613 "2007-03-30T09:43:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phil\_Darnowsky](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee7513/32.png) [@Phil\_Darnowsky](https://www.ruby-forum.com/u/Phil_Darnowsky)\
**Post date:** [March 30, 2007, 9:43am UTC](https://www.ruby-forum.com/t/required-module-automatically-including-except-in-debian/90613/1 "2007-03-30T09:43:32Z")

</div>

Dear everyone,

I’ve recently joined a project which has some code analagous to this:

included.rb:

OUTER\_CONST = ‘foo’  
module Included  
INNER\_CONST = 42  
end

includer.rb:

require ‘included’  
puts OUTER\_CONST # =\> foo  
puts INNER\_CONST # =\> 42 (but why does this work?)

Now, you’ll notice that includer.rb does require included, but never  
actually includes it–yet in this setup, everyone swears up and down,  
with logs to back it up, that it works. Before I came on, it was a  
mixed Gentoo Linux/OS X/FreeBSD development environment, and apparently  
it worked in all three of these OSes, but not in the new Debian box I  
set up.

I’ve been back and forth through the Pickaxe book and the Web trying to  
find out what might make these three environments behave this way, but  
not Debian. The Debian box and FreeBSD are both running Ruby 1.8.5, the  
others I don’t have access to at the moment. The Gentoo machine does  
have their special -rauto\_gem in RUBYOPT, but when I tried replicating  
auto\_gem.rb on the Debian box it didn’t help–included.rb isn’t a gem  
anyhow.

I am truly stumped, and I’m not alone in this. Anyone have any  
thoughts? Thanks if you do!

–Phil

---

<div class="post-metadata">

**Author:** ![Phil\_Darnowsky](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee7513/32.png) [@Phil\_Darnowsky](https://www.ruby-forum.com/u/Phil_Darnowsky)\
**Post date:** [March 30, 2007, 4:55pm UTC](https://www.ruby-forum.com/t/required-module-automatically-including-except-in-debian/90613/2 "2007-03-30T16:55:49Z")

</div>

On Fri, 30 Mar 2007, Phil Darnowsky wrote:

> actually includes it–yet in this setup, everyone swears up and down,  
> auto\_gem.rb on the Debian box it didn’t help–included.rb isn’t a gem  
> anyhow.
> 
> I am truly stumped, and I’m not alone in this. Anyone have any  
> thoughts? Thanks if you do!

grep the source for ‘const\_missing’. someone may have done something  
strange  
with it. another thing is that require itself may have been overriden.

-a
