Sylvain Joyeux
11/8/2007 10:42:00 AM
On Thu, Nov 08, 2007 at 07:11:28PM +0900, Rémi Lavergne wrote:
> My ruby interpreter is
> able to locate it, I would like to be able to do the same either in ruby
> or in sh script. Any idea ?
The interpreter searches the file in directories defined in $LOAD_PATH.
You can do the same ...
location = $LOAD_PATH.find { |dirname| File.exists?(File.join(dirname, filename) }
Sylvain