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 Rimbeau

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

Datum: Mon, 20 Aug 2007 18:14:01 +0900
Von: "Nicolas Rimbeau" <nicolas.rimbeau@gmail.com>
An: ruby-talk@ruby-lang.org
Betreff: 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 Rimbeau

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

···

--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger

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 8/20/07, Nicolas Rimbeau <nicolas.rimbeau@gmail.com> wrote:

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,

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

···

On Aug 21, 3:36 pm, Gordon Thiesfeld <gthiesf...@gmail.com> 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