From: ara.t.howard@... Date: 2006-10-25T03:27:41+09:00 Subject: Re: Getting path of current script On Wed, 25 Oct 2006, Joe Ruby MUDCRAP-CE wrote: > Is there a simpler way to get the absolute path of the current script? > > path = File.dirname(File.expand_path(__FILE__)) > > File.dirname(__FILE__) by itself can return a relative or absolute path. > > Joe just a note, what you have above is not the dir for the current script, it's the dir for the current file - eg the value will be the same whether the file is run or required/loaded. for the current script you need path = File.dirname(File.expand_path($0)) or File.dirname($0) -a -- my religion is very simple. my religion is kindness. -- the dalai lama