From: James Britt Date: 2004-11-04T10:01:12+09:00 Subject: Re: [RAKE] rdoc task fails on Win2k Jim Weirich wrote: > Rake just feeds the command string to the system call. Try executing > > system %{rdoc -o doc --main 'README.rdoc' -T 'html' > README.rdoc ./lib/catapult.rb ./lib} > > and see what happens. If it fails the same way, then we need to figure out > what we need to feed windows to get it to run (e.g. maybe system > %{rdoc.cmd ...} or something like that). Here's what I ran, same dir as running rake puts( system( %{rdoc -o doc --main 'README.rdoc' -T 'html' README.rdoc ./lib/catapult.rb ./lib} ) ) puts( $? ) and here's what I get: false nil So it fails, but there's no residue. :( It appears to be related to rdoc on windows being called through rdoc.bat I wrote a simple batch file, foo.bat: REM foo.bat dir and tried this Ruby code: puts( system( %{foo} ) ) # false, doesn't seem to find foo.bat puts( $? ) # nil But this correctly calls foo.bat: puts( system( %{foo.bat} ) ) # prints directory, then true puts( $? ) # 0 So I added the '.bat' extension to the rdoc call, and 'system' is quite happy: puts( system( %{rdoc.bat -o doc --main 'README.rdoc' -T 'html' README.rdoc ./lib/catapult.rb ./lib} ) ) # Works! ... > >>In lieu of that, shouldn't I get an error for passing an unknown parameter, >>so at least I don't run something I didn't intend? > > > So noted. Thanks. James >