ZenTest autotest problem on Windows XP

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.

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

Datum: Mon, 20 Aug 2007 18:14:01 +0900
Von: “Nicolas R.” [email protected]
An: [email protected]
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,

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

On 8/20/07, Nicolas R. [email protected] 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…

On Aug 21, 3:36 pm, Gordon T. [email protected] 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

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