From: Fred Phillips Date: 2008-08-12T09:59:22+09:00 Subject: Re: Problems with accessing directory defined in ENV variables --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue Aug 12 08:06:45 2008, Thomas Luedeke wrote: > Fred Phillips wrote: > > On Tue Aug 12 06:46:26 2008, Thomas Luedeke wrote: > >> However, if I try to change to that directory with a command such as > >> Dir.chdir(" #{ENV['TMPDIR']} " ), I always get errors like this: > >=20 > > You don=E2=80=99t need the quotes, you can just do: > >=20 > > Dir.chdir(ENV['TMPDIR']) >=20 > Whew - that did it. Thanks so much - that is a serious load off my=20 > back. >=20 > Just for my newbie education, what was going wrong with what I was=20 > doing? What was Ruby thinking I was asking for?? Your first example would expand to " /TEMP2002/t3905 " not "/TEMP2002/t3905" like you wanted. I think in your second example you still had the space immediately after the " (" #{ENV['TMPDIR']}") --=20 Fred O. Phillips http://fophillips.org BBC7 7572 755F 83E0 3209 504A E4F7 874F 1545 9D41 --1yeeQ81UyVL57Vl7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkig4PQACgkQ5PeHTxVFnUGNtACguyqSORzsE8LOl1v/oj2GuaZX i8oAmwTauHB3+kBMmAlsufzvoJLPjJVJ =uBtu -----END PGP SIGNATURE----- --1yeeQ81UyVL57Vl7--