------art_2939_22569519.1219930862181
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

2008/8/28 Zhao Yi <youhaodeyi / gmail.com>

> My ruby script and module script are in the same directory. I print the
> $: variable and found the current directory "." is in there. But I
> always get the error: no such file to load.
>
> What is the problem?




Would help if you posted your code, but I'll hazard a guess. I usually
require files relative to the current one like this:

require File.dirname(__FILE__) + '/my_module'

The value of File.dirname(__FILE__) is always the path of the directory
containing the currently executing file.

--
James Coglan
http://blog.jcoglan.com
http://github.com/jcoglan

------art_2939_22569519.1219930862181--