From: Jim Clark Date: 2007-12-06T15:30:00+09:00 Subject: Re: Komodo debugger question > My project has three directories: lib, test, and examples. Now if I > open up a DOS window to the top level project directory and run my > example code such as "ruby examples/file_example.rb", it runs fine. > However, when I debug, Komodo doesn't understand my path structure > such that if I open up file_example.rb and start the debugger, I get a > "no such file to load" on my require statement. > > So, how do I set up Komodo to understand that it should look in the > lib directory to find the 'require' file? Never mind. I found a better cross-platform way in the pickaxe 2nd ed. page 160. What I do is "... a little load path magic" and put this before my require statements: $:.unshift File.join(File.dirname(__FILE__), "..", "lib") With this it doesn't matter which directory I start the code from and it works. Cheers, Jim