From: Alex Young Date: 2007-10-20T19:06:19+09:00 Subject: Re: require with absolute path Ayhan Molla wrote: > Hi, > I am trying to require the xml builder library using the require statement as follows: > > require 'C:/builder-2.1.2/lib/builder.rb' > > builder.rb in turn has two requires inside using relative paths: > > require 'builder/xmlmarkup' > require 'builder/xmlevents' > > Althougn those files exists in the builder directory, ruby complains and give this error: > require': no such file to load -- builder/xmlmarkup (LoadError) > > This is strange since $: variable has "." evertime it loads a file, so it should find the files in "builder" folder. What is the correct way to load the files in that case? put everything under ruby lib folder so that they are in $: ? Doesn't the "." refer to the cwd of the ruby process, rather than the directory of the file that contains it? -- Alex