From: ahoward Date: 2003-03-21T01:37:40+09:00 Subject: Re: Find::Bin, use lib, in ruby On Thu, 20 Mar 2003, Brian Candler wrote: > On Thu, Mar 20, 2003 at 03:03:09AM +0900, Daniel Bretoi wrote: > > rubyscripts/bin/script.rb > > rubyscripts/lib/libforscript.rb > > > > How can I tell script.rb where to look for libforscript.rb without > > having to use absolute paths? > > $:.unshift "../lib" > require "libforscript.rb" what if you were in /usr/bin/ while running script.rb? the '../lib' needs to be relative to the location of script.rb, not the current working directory. -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================