--AhhlLboLdkugWU4S Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon Oct 27 19:01:04 2008, Kenneth McDonald wrote: > __FILE__ is just giving me the file name, with no path, and Dir.getwd is > giving me an error: "ENOENT: No such file or directory." What is the proper > way to get this info? __FILE__ gives you the path it was called with, if your Ruby script is in the current working directory it will return /foo.rb¡É if it is in /usr/local/bin __FILE__ will be ¡È/usr/local/bin/foo.rb¡É. Ifou want the full path instead of ¡È./¡É Dir.getwd should work. -- Fred O. Phillips http://fophillips.org BBC7 7572 755F 83E0 3209 504A E4F7 874F 1545 9D41 --AhhlLboLdkugWU4S Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkkGFJwACgkQ5PeHTxVFnUFtIwCfbem5TE/BO0VLBS+bKxoX2eSo tgEAniYr3+gpj3iAXQcb/4jJzS7N91m6 ¿²R -----END PGP SIGNATURE----- --AhhlLboLdkugWU4S--