From: dusty Date: 2008-12-17T14:52:21+09:00 Subject: Re: Unable to locate config file. On Dec 16, 10:16 pm, Ch Ba wrote: >  I have a gemmed command line utility that requires a configuration > file. The configuration file is included in the gem and installs in the > base directory. A file in /lib needs to load it, but I am unable to do > so. Calling '../config.yml' does not locate it, nor does anything else > I've tried so far as the current directory is just wherever the command > line utility is being run from. How can I locate this configuration file > in a friendly os independent way? > -- > Posted viahttp://www.ruby-forum.com/. Try File.join(File.dirname(__FILE__),'..','config.yml')