Daniel Berger
10/16/2006 10:19:00 PM
Jan Svitok wrote:
> On 10/16/06, msoulier <msoulier@gmail.com> wrote:
> > Command failed with status (1): [c:/ruby/bin/ruby -w -IC:/Documents and
> > Set...]
>
> Spaces in pathnames. #1 reason to not install ruby into Program Files.
> Only way around this issue is to enclose the pathname in quotes as in
>
> c:/ruby/bin/ruby -w -I"C:/Documents and Set..."
>
> Problem is that you'll need to quote the path in so many places deep
> in ruby... So far nobody dared to fix that. On unix, you can escape
> the spaces with a backslash, on windows, I don't know of any such
> possibility (see help for cmd.exe if you want).
>
> Another way is to avoid such paths (possibly using subst).
Maybe I should talk to Jim about this. One solution might be to use
File.short_path (in the win32-file package):
irb(main):001:0> require 'win32/file'
irb(main):002:0> File.short_path("C:\\Documents and Settings")
=> "DOCUME~1"
The win32-file package now comes standard with Curt's one-click
installer. There's also a gem for win32-file, so it could be added as
a dependency for Rake on Windows if needed.
Regards,
Dan