From: Fred Phillips Date: 2008-08-12T08:03:04+09:00 Subject: Re: Problems with accessing directory defined in ENV variables --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue Aug 12 06:46:26 2008, Thomas Luedeke wrote: > Ruby is giving me pure hell trying to access directories on a mounted > drive. Our network puts certain files on a temporary drive defined in > our .profile file I'm running HP UX/11). >=20 > If I ask for puts ENV['TMPDIR'], it knows what the pathway is (i.e. it > gives /TEMP2002/t3905). >=20 > If I issue a system command `echo $TMPDIR`, it also gives the right > answer. >=20 > However, if I try to change to that directory with a command such as > Dir.chdir(" #{ENV['TMPDIR']} " ), I always get errors like this: You don=E2=80=99t need the quotes, you can just do: Dir.chdir(ENV['TMPDIR']) --=20 Fred O. Phillips http://fophillips.org BBC7 7572 755F 83E0 3209 504A E4F7 874F 1545 9D41 --sm4nu43k4a2Rpi4c Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkigxaYACgkQ5PeHTxVFnUEb7QCgk3AofC7+I7xxjp1mcg0uiosq mgMAmwdmlTOE2eYh0L92YWo7v2lpsyIx =RFtY -----END PGP SIGNATURE----- --sm4nu43k4a2Rpi4c--