# ZenTest autotest problem on Windows XP

**URL:** <https://www.ruby-forum.com/t/zentest-autotest-problem-on-windows-xp/112501>\
**Category:** Ruby\
**Created:** [August 20, 2007, 11:15am UTC](https://www.ruby-forum.com/t/zentest-autotest-problem-on-windows-xp/112501 "2007-08-20T11:15:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nrimbeau](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f14d63/32.png) [@nrimbeau](https://www.ruby-forum.com/u/nrimbeau)\
**Post date:** [August 20, 2007, 11:15am UTC](https://www.ruby-forum.com/t/zentest-autotest-problem-on-windows-xp/112501/1 "2007-08-20T11:15:11Z")

</div>

Hello,

I have a problem using autotest on Windows XP. When launching  
‘autotest -rails’, autotest runs the following command :

C:\Program Files\ruby\bin\ruby -I.;lib;test -rtest/unit -e "%w […]  
| unit\_diff -u

As you can see, I installed ruby in “Progam Files” directory, which  
now represents a problem when running autotest. Indeed, I get the  
following error message :

‘C:\Program’ is not a valid command.

simply because of the space between “Program” and “Files”. I didn’t  
find anything about this problem on google, I guess because the  
default ruby directory is “C:\ruby” and I may be the only one who  
wanted to change that.

Any chance I can fix that myself ?

Thanks a lot,

Nicolas R.

---

<div class="post-metadata">

**Author:** ![nrimbeau](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f14d63/32.png) [@nrimbeau](https://www.ruby-forum.com/u/nrimbeau)\
**Post date:** [August 21, 2007, 10:25am UTC](https://www.ruby-forum.com/t/zentest-autotest-problem-on-windows-xp/112501/2 "2007-08-21T10:25:32Z")

</div>

-------- Original-Nachricht --------

> Datum: Mon, 20 Aug 2007 18:14:01 +0900  
> Von: “Nicolas R.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> An: removed\_email\_address@domain.invalid  
> Betreff: ZenTest autotest problem on Windows XP

> following error message :  
> Thanks a lot,
> 
> Nicolas R.

Dear Nicolas,

unfortunately, I haven’t got Windows XP handy right now to test it,  
but I think if you enclose C:\Program Files\ruby\bin\ruby  
in quotes, as suggested here

[http://www.tnk-bootblock.co.uk/forum/viewtopic.php?t=612](http://www.tnk-bootblock.co.uk/forum/viewtopic.php?t=612),

you should be fine. So you’ll have to correct that in the program  
that creates the string C:\Program Files\ruby\bin\ruby  
in the first place.

Best regards,

Axel

---

<div class="post-metadata">

**Author:** ![nrimbeau](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f14d63/32.png) [@nrimbeau](https://www.ruby-forum.com/u/nrimbeau)\
**Post date:** [August 21, 2007, 10:14pm UTC](https://www.ruby-forum.com/t/zentest-autotest-problem-on-windows-xp/112501/3 "2007-08-21T22:14:49Z")

</div>

On 8/20/07, Nicolas R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> following error message :  
> Thanks a lot,  
> I don’t think it’s a good idea to install ruby in a directory with  
> spaces. You’ll encounter this problem many more times. Anyway, I’d be  
> glad if I’m wrong…

---

<div class="post-metadata">

**Author:** ![nrimbeau](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f14d63/32.png) [@nrimbeau](https://www.ruby-forum.com/u/nrimbeau)\
**Post date:** [August 21, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/zentest-autotest-problem-on-windows-xp/112501/4 "2007-08-21T22:42:53Z")

</div>

On Aug 21, 3:36 pm, Gordon T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Any chance I can fix that myself ?
> 
> Try this in your .autotest file
> 
> Autotest.send(:alias\_method, :real\_ruby, :ruby)  
> Autotest.send(:define\_method, :ruby) do |\*args|  
> return %[call “#{real\_ruby}”]  
> end

Sorry, I hit send before I was done. Just wrapping the ruby method in  
quotes alone didn’t work for me, but putting call in front of it seems  
to work.

Hope it helps.

Gordon

---

<div class="post-metadata">

**Author:** ![nrimbeau](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f14d63/32.png) [@nrimbeau](https://www.ruby-forum.com/u/nrimbeau)\
**Post date:** [August 21, 2007, 10:40pm UTC](https://www.ruby-forum.com/t/zentest-autotest-problem-on-windows-xp/112501/5 "2007-08-21T22:40:53Z")

</div>

> Any chance I can fix that myself ?

Try this in your .autotest file

Autotest.send(:alias\_method, :real\_ruby, :ruby)  
Autotest.send(:define\_method, :ruby) do |\*args|  
return %[call “#{real\_ruby}”]  
end
