From: Kimball Johnson Date: 2010-01-02T11:33:17+09:00 Subject: Re: How to get the directory of the current script? laredotornado wrote: > Hi, > > How do I get the directory path of the file that is currently > executing? > > Also, if I have a module, within a function, how do I get the parent > directory (full path) of that module? > > Thanks, - Dave As to getting the parent directory of a file, try this: File.dirname(File.dirname(__FILE__)) or for the absoluter path: File.expand_path(File.dirname(File.dirname(__FILE__))) dumb but smart? -- Posted via http://www.ruby-forum.com/.