From: Olivier Renaud Date: 2007-03-02T23:05:47+09:00 Subject: Re: __PATH__ like __FILE__? Le vendredi 02 mars 2007 14:55, Deniz Dogan a �crit�: > Hello. > I'm rather new to Ruby, so please bare with me. I just want to know if > there is anything similar to __FILE__ but which represents either the > path to the directory which __FILE__ lies in, or the __FILE__ including > the full path to the file? > > --Deniz Dogan You have to use the File.expand_path to do this : File.expand_path(__FILE__) File.dirname(File.expand_path(__FILE__)) -- Olivier Renaud