From: Jim Freeze Date: 2003-01-12T10:23:16+09:00 Subject: Re: 'require' search path On Saturday, 11 January 2003 at 20:23:51 +0900, Tim Bates wrote: > I wish 'require' would count the current directory as the directory the file > is in, rather than the directory the script is being run from. My test > scripts do > I have my make file that runs my tests create a directory with a parallel structure that parallels the installed directory tree. In this directory I put soft links to the local files. This way I can test the new code in any directory, even while old code is installed. Using this method I don't have to have special require code nor do I have to modify the source. EG. make test will create mylib +-myclass1.rb->/path/to/myclass1.rb # soft link +-myclass2.rb->/path/to/myclass2.rb # soft link and will run ruby -I mylib ts_mycode.rb To run code that is installed, just run without the -I. -- Jim Freeze ---------- Furious activity is no substitute for understanding. -- H. H. Williams