From: Andrew Walrond Date: 2003-11-25T06:09:36+09:00 Subject: Re: Library path relative to current .rb file The full solution is worse. To handle the case of the script being executed via symlinks or relative paths, you need to do something like this: require 'ftools' dir = File.expand_path(__FILE__) while File.symlink?(dir); dir = File.readlink(dir); end SCRIPT_DIR = File.dirname(dir) require SCRIPT_DIR+'/my_script.rb' ...