From: Nicholas Van Weerdenburg Date: 2004-07-18T03:10:22+09:00 Subject: Ruby require path issues How does one get $: to seamlessly include the directory of the parent script? I've written a library: foo.rb And a script, dofoo.rb which does 'require "foo"'. If I run dofoo.rb in it's own directory, require works. If I include it's directory in my path, and run it from another directory, it can't find the foo.rb library. I've used $:.push("the path to my library") ( e.g. $:.push(File.dirname($0)) ) before the require, which works but seems inelegant. Ultimately, I'd like to be able to distribute a set of scripts that any user could drop into a path location. Are there any other ways to do this (assuming no knowledge of the target system)? Thanks, Nick