On 29.11.2008 19:51, Matthias Hennemeyer wrote:
> File.dirname(__FILE__) always refers to the current folder.

Or rather File.dirname($0) if you want the main script file's directory. 
  __FILE__ depends on the currently executed file which can be anywhere.

See also "ri Pathname" for other options.

Kind regards

	robert