ZenTest autotest problem on Windows XP

N

Nicolas Rimbeau

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
 
A

Axel Etzold

-------- Original-Nachricht --------
Datum: Mon, 20 Aug 2007 18:14:01 +0900
Von: "Nicolas Rimbeau" <[email protected]>
An: (e-mail address removed)
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
 
J

Jano Svitok

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,

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...
 
G

Gordon Thiesfeld

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
 
G

Gordon Thiesfeld

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
 

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,772
Messages
2,569,593
Members
45,113
Latest member
Vinay KumarNevatia
Top