On Jan 2, 2007, at 15:50, jeffz_2002 / yahoo.com wrote:

> I'd like to know how people people managing their file dependencies
> with projects with several directories. [...]
>
> I've been working on a small project with several directories.  Using
> the $:.unshift File.join( ( File.expand_path( File.dirname( __FILE__ )
> ) ), '..', '..', 'blah' ) trick gets pretty boring to type, doesn't do
> much for the code readability, and doesn't help when files get moved
> around.
>
>     require 'find'
>     Find.find( File.expand_path( File.dirname( __FILE__ ) ) ) do | 
> path|
>       if FileTest.directory?(path)
>         $:.unshift path
>       end
>     end

This'll work great right up until you have something like myproj/ 
time.rb and you also need time.rb from stdlib.

Instead, use explicit paths like everybody else does, it'll be less  
confusing.

-- 
Eric Hodel - drbrain / segment7.net - http://blog.segment7.net

I LIT YOUR GEM ON FIRE!