From: Recheis Meinrad Date: 2003-09-09T22:20:27+09:00 Subject: "require and subdirectories" problem This is a multi-part message in MIME format. ------_=_NextPart_001_01C376D5.4988B134 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hi, consider a script foo.rb that contains the line require './lib/lib.rb' lib.rb contains the line: require './lib/annother.rb' it works.=20 (require 'annother.rb' doesn't work allthough the file annother.rb is = placed in the same directory as lib.rb) but i am not very pleased with it. the library in the directory lib, = must not know from where it is required. what can i do so that lib can require all it's files no matter where the = script that requires lib.rb is located? - henon ------_=_NextPart_001_01C376D5.4988B134 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable "require and subdirectories" problem

hi,
consider a script foo.rb that contains = the line

require './lib/lib.rb'

lib.rb contains the line:

require './lib/annother.rb'

it works.
(require 'annother.rb'  doesn't = work allthough the file annother.rb is placed in the same directory as = lib.rb)

but i am not very pleased with it. the = library in the directory lib, must not know from where it is = required.
what can i do so that lib can require = all it's files no matter where the script that requires lib.rb is = located?


- henon

------_=_NextPart_001_01C376D5.4988B134--