On Friday 02 November 2001 23:14, Tobias Reif wrote:
> David Alan Black wrote:
> > Yes.  Doesn't it?
>
>  From file a, I require a file b (located in a directory under the
> current one), which requires a file c (b and c are located in the same
> directory).
> For that second require (b requires c), I get a loadError.
I tried it and got the same error as you;
---
armin@duck1:/tmp/tobias > ./a.rb
../b.rb:3:in `require': No such file to load -- c (LoadError)
        from ../b.rb:3
        from ./a.rb:2:in `require'
        from ./a.rb:2
---
if you write the 2nd require as
require '../c'
despite the fact that your code is in ../
it does work;
why all that?
I guess ruby stays in the same dir.. and never changes;

	Armin

> If I run b directly (which requires c); no error.
> When I run a, I again get the loadError that says b can't load c.
> I can require c from a, c form b, but not c from b from a.
>
> ?
>
> Tobi

-- 
Armin.

-----------------------------------------------
Armin Roehrl, http://www.approximity.com
"The best way to predict the future is to invent it."
                                          --Alan Kay