From: Brian Candler Date: 2010-01-27T16:48:06+09:00 Subject: Re: require files namespace! Roger Pack wrote: > What's the full backtrace? (chances are you have a stray "tool" in there > somewhere) Yes, it's saying that you're using "tool" (lower-case t) by itself. If I take just the code you posted, then it works fine for me under ruby-1.8.7 and Ubuntu Karmic: $ ls -lR .: total 4 drwxr-xr-x 3 brian brian 4096 2010-01-27 07:45 lib ./lib: total 8 drwxr-xr-x 2 brian brian 4096 2010-01-27 07:45 tool -rw-r--r-- 1 brian brian 68 2010-01-27 07:44 tool.rb ./lib/tool: total 8 -rw-r--r-- 1 brian brian 25 2010-01-27 07:44 sentence.rb -rw-r--r-- 1 brian brian 21 2010-01-27 07:44 word.rb $ head $(find . -type f) ==> ./lib/tool/word.rb <== class Tool::Word end ==> ./lib/tool/sentence.rb <== class Tool::Sentence end ==> ./lib/tool.rb <== module Tool require 'tool/word.rb' require 'tool/sentence.rb' end $ irb -Ilib --simple-prompt >> require 'tool.rb' => true >> (However, note that it is preferred if you require 'tool' rather than require 'tool.rb') -- Posted via http://www.ruby-forum.com/.