From: Luis Lavena Date: 2008-01-12T22:35:01+09:00 Subject: Re: Problems with first gem using Rake/Hoe On 11 ene, 22:02, Jim Clark wrote: > Hi, > > I'm trying to package my first gem using Hoe (1.4.0) and am having > difficulties with Rake (0.8.1) on a Windows XP system. What I notice is > that when I execute the task through Rake, it will fail yet I can > execute the task outside of Rake. For instance: > > [...] > > Using Google, I see that I am not the only one who has seen these errors > in various incarnations. Does anyone understand why Rake fails when the > tasks succeed otherwise? > The problem is related to system() and ruby. It don't take as valid "executables" the batch files (.bat or .cmd) that ruby on Windows need to get gem, rake, or other gem installed tools run. Try the following in a IRB session: irb(main):005:0> system "gem", "-v" => false irb(main):006:0> system "gem.bat", "-v" 0.9.4 => true I you take a closer look, you see that I needed to provide the file extension to get it working. Hoe task lack the extension of the command, mostly because it need to be cross-platform compatible, and is just Windows that needs it. You can suggest a patch to Hoe project that takes RUBY_PLATFORM in consideration and set the correct system call. HTH, -- Luis Lavena