Paul Brannan <pbrannan / atdesk.com> writes:

> On another note, is there any way to require a file out of the current
> directory?  Currently, I am using:
> 
> def requirelocal(file, *args)
>   caller_file, *foo = caller[0].split(':')
>   caller_dir = File.dirname(caller_file)
>   require File.join(caller_dir, file)
> end

In rubicon I use

   $: << File.dirname($0) << File.join(File.dirname($0), "..")

to include the current directory and its parent in the search path.

Of course this is a global change, but for my purposes this is OK.


Dave