From: Grehom Date: 2005-12-19T07:27:46+09:00 Subject: Re: Newbie: require 'filename' - undefined local variable or method... Thanks Gene and Ezra, I tried your suggestions but with no luck. I modified the main program 'mainprog.rb' as follows: puts $: load("stuff.rb", wrap=false) puts myhash["a"] This produced following output: C:\rubysrcs>ruby mainprog.rb c:/ruby/lib/ruby/site_ruby/1.8 c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt c:/ruby/lib/ruby/site_ruby c:/ruby/lib/ruby/1.8 c:/ruby/lib/ruby/1.8/i386-mswin32 . mainprog.rb:5: undefined local variable or method `myhash' for main:Object (NameError) and it seems the pwd '.' is part of the Load Path already (without me changing anything) So I'm still puzzled (there are a few examples of code like this in aforementioned tutorial book)!