autotest broken on winxp?

J

Jeff

I haven't tried autotest on windows for a long time, but I thought it
worked back then. Now, I get this error:

C:\dev\row>autotest
c:/program
files/ruby/lib/ruby/gems/1.8/gems/ZenTest-3.4.2/lib/autotest.rb:294:in
`expand_path': couldn't find HOME environment -- expanding
`~/.autotest' (ArgumentError)
from c:/program
files/ruby/lib/ruby/gems/1.8/gems/ZenTest-3.4.2/lib/autotest.rb:294
from c:/program
files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from c:/program
files/ruby/lib/ruby/gems/1.8/gems/ZenTest-3.4.2/lib/rails_autotest.rb:1
from c:/program
files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from c:/program
files/ruby/lib/ruby/gems/1.8/gems/ZenTest-3.4.2/bin/autotest:44
from c:/Program Files/ruby/bin/autotest:18

I think I remember having to hand-fix some code originally, but again
it was a long time ago (maybe 6 months ago).

I also tried "autotest -rails" at the top folder of one of my rails
projects, but I got the same error.

Any idea what I'm doing wrong? Or is this a known issue with autotest
perhaps?

I have zentest 3.4.2 (did a gem update zentest to make sure), and I'm
on WinXP SP2.

Thanks!
Jeff
 
E

Eric Hodel

I haven't tried autotest on windows for a long time, but I thought it
worked back then. Now, I get this error:

C:\dev\row>autotest
c:/program
files/ruby/lib/ruby/gems/1.8/gems/ZenTest-3.4.2/lib/autotest.rb:294:in
`expand_path': couldn't find HOME environment -- expanding
`~/.autotest' (ArgumentError)

Well, windows doesn't expand ~.
I think I remember having to hand-fix some code originally, but again
it was a long time ago (maybe 6 months ago).

I also tried "autotest -rails" at the top folder of one of my rails
projects, but I got the same error.

Any idea what I'm doing wrong?

You haven't filed a bug so we can track and fix it.
 
J

Jeff

Eric said:
You haven't filed a bug so we can track and fix it.

I know, I just thought I'd ask the community if there's something I
should investigate first, before I bother you with a ticket... I'll go
ahead and file a bug for it.

Thanks!
Jeff
 
D

David Vallner

--------------enigB2F5C9A6748AB908F45A99BB
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I haven't tried autotest on windows for a long time, but I thought it
worked back then. Now, I get this error:
=20
C:\dev\row>autotest
c:/program
files/ruby/lib/ruby/gems/1.8/gems/ZenTest-3.4.2/lib/autotest.rb:294:in
`expand_path': couldn't find HOME environment -- expanding
`~/.autotest' (ArgumentError)
from c:/program

Do you have the HOME environment variable set?

=46rom ri File.expand_path:

The given pathname may start with a ``+~+'', which expands to the
process owner's home directory (the environment variable +HOME+ must be
set correctly). ``+~+_user_'' expands to the named user's home directory.=


This is arguably a bug in File.expand_path rather than ZenTest. (On
Windows systems, a fallback to ENV['HOME'] should be ENV['HOMEDRIVE'] +
ENV['HOMEPATH']. Wonder where you report those.

David Vallner


--------------enigB2F5C9A6748AB908F45A99BB
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)

iD8DBQFFeuq6y6MhrS8astoRAh4EAJ92Zr9HYvG6h1wjApd0dFbf+KEwUACeNAmc
SDny87lI8VLrkN6q3bh9pkw=
=f393
-----END PGP SIGNATURE-----

--------------enigB2F5C9A6748AB908F45A99BB--
 
D

Daniel Berger

David said:
Jeff said:
I haven't tried autotest on windows for a long time, but I thought it
worked back then. Now, I get this error:

C:\dev\row>autotest
c:/program
files/ruby/lib/ruby/gems/1.8/gems/ZenTest-3.4.2/lib/autotest.rb:294:in
`expand_path': couldn't find HOME environment -- expanding
`~/.autotest' (ArgumentError)
from c:/program

Do you have the HOME environment variable set?

From ri File.expand_path:

The given pathname may start with a ``+~+'', which expands to the
process owner's home directory (the environment variable +HOME+ must be
set correctly). ``+~+_user_'' expands to the named user's home directory.

This is arguably a bug in File.expand_path rather than ZenTest. (On
Windows systems, a fallback to ENV['HOME'] should be ENV['HOMEDRIVE'] +
ENV['HOMEPATH']. Wonder where you report those.

This has been discussed before. See http://tinyurl.com/y52hs3, among
others.

The fundamental issue is that "~" is a shell thing, not an OS thing. To
me, the bug is that File.expand_path accepts '~' at all. But, things
are what they are. Come to think of it, I could add support for this in
win32-file. :)

In practice I never use '~'. I mostly use ENV['HOME'] ||
ENV['USERPROFILE'].

Regards,

Dan
 
D

David Vallner

--------------enig9B592170808A2CB5C2D26DEC
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Daniel said:
David said:
Jeff said:
I haven't tried autotest on windows for a long time, but I thought it=
worked back then. Now, I get this error:

C:\dev\row>autotest
c:/program
files/ruby/lib/ruby/gems/1.8/gems/ZenTest-3.4.2/lib/autotest.rb:294:i= n
`expand_path': couldn't find HOME environment -- expanding
`~/.autotest' (ArgumentError)
from c:/program

Do you have the HOME environment variable set?

From ri File.expand_path:

The given pathname may start with a ``+~+'', which expands to the
process owner's home directory (the environment variable +HOME+ must b= e
set correctly). ``+~+_user_'' expands to the named user's home directo= ry.

This is arguably a bug in File.expand_path rather than ZenTest. (On
Windows systems, a fallback to ENV['HOME'] should be ENV['HOMEDRIVE'] = +
ENV['HOMEPATH']. Wonder where you report those.
=20
This has been discussed before. See http://tinyurl.com/y52hs3, among
others.
=20

Erght, I forgot about %USERPROFILE%. Well, that leaves the whole thing
rather fuzzy. So, bug in autotest for relying on File.expand_path with a
tilde, or Ruby for letting people rely on it? Or the usual, let's blame
Microsoft *ducks*.

David Vallner


--------------enig9B592170808A2CB5C2D26DEC
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)

iD8DBQFFfCcCy6MhrS8astoRAiRkAJ9zySx6gl7vzD9oGDm08hH5G+xsggCeLLQP
35GWDF3ZKqn0vojEuMXp4r0=
=emNO
-----END PGP SIGNATURE-----

--------------enig9B592170808A2CB5C2D26DEC--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top