Raj Sahae wrote:
>> Is there
>> something special I need to do in the hierarchy of Ruby script locations
>> so that other scripts can respect any other script I want to require?
>> These two scripts are in the same directory
> There are a couple ways to solve this problem.  I don't know if there is
> a best way.  Hopefully someone with more experience can shed light on
> that for me.  But the problem you are having is that your scripts are
> not in a directory that is included when ruby searches for the files
> that you require.  To solve this, I simply add the directory to the path
> variable "$:".
> 
> So, if you are keeping scripts called myscript.rb and otherscript.rb in
> a folder c:\myfolder, then in your script you would say
> 
> $: << "c:/myfolder/"
> require "myscript"
> require "otherscript"

Raj,
I got an "unexpected tLSHFT" error message when I put that $: line at 
the top. But, I appreciate your explanation. Using what you told me and 
what Tim suggested next helped me to make it work. I put my "required" 
Ruby file in ../ruby/lib/1.8, with all those other .rb files in there. 
Thanks a lot!

-- 
Posted via http://www.ruby-forum.com/.