From: Luis Lavena Date: 2011-02-14T02:55:24+09:00 Subject: Re: System with multiple arguments fails on Windows when there are umlauts in the PATH On Feb 13, 3:06 am, Sebastian Hungerecker wrote: > We have recently discovered a nasty bug in our software, in which it > failed to call one of the commands that come with it using system. Please make it more prominent the version of Ruby you're talking because hunting it down to the middle of the post make it hard to discard or accept there is a bug and in which version of Ruby. > [...] What you report here is something that was found on 1.8.x codebase and that has been already solved under 1.9.2 Have you tried 1.9.2? Support for unicode directories has already been implemented and system with single or multiple parameters should work. > [...] > > Using "bla someargument" on the command line works as expected. So does > calling system("bla someargument") or `bla someargument` in ruby. However > system("bla", "someargument") simply returns false without any further > error message. system() with multiple arguments is flawed in 1.8.x, but solved in 1.9.1 and 1.9.2 Rake contains alt_system functionality that allow Ruby 1.8.7 avoid the error you're mentioning. Perhaps you want to take a look to it if you're stuck with Ruby 1.8.7 > Can someone confirm this behavior and that this is indeed a bug in ruby and > not some error on our part? Is this a known bug? Does it still exist in ruby > 1.9? Should I file a bug report? > Confirmed above, bug fixed, not present in 1.9.x > Currently we worked around this by switching to the single-argument > version of > system and placing quotes around the arguments to handle spaces. However > this > seems like a fragile solution to me. > Path with spaces are fragile. > So is there a better way to fix this? Telling users not to install into a > directory containing umlauts is *not* an option. > Upgrade to 1.9.2 which supports Unicode directories and filenames properly. -- Luis Lavena