From: Patrick Hof Date: 2006-03-27T01:38:58+09:00 Subject: Re: File.new raise an exception ? --m51xatjYGsM+13rf Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Jean-Fran=E7ois Boisvieux schrieb: > irb(main):001:0> foo =3D File.open("test") > Errno::ENOENT: No such file or directory - test > from (irb):1:in `initialize' > from (irb):1:in `open' > from (irb):1 >=20 > I just do not understand the problem ( I can create a file with =20 > python in the same directory ), what's wrong for me ? Ruby is opening the file for reading per default. As there seems to be no file with the name test, you get the error. To open it for writing, you have to say File.open("test", "w") Patrick --=20 "Ah. Philosophy," said Om. (Small Gods) --m51xatjYGsM+13rf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFEJsPvfpK5yKGUrIURApKQAJ4q0X94wPuAnKKZblHHrpBQO7SvjQCghOSt W9/zK8BqHCFldSrw7krOx74= =SLPb -----END PGP SIGNATURE----- --m51xatjYGsM+13rf--