From: Stefan Lang Date: 2005-11-08T23:41:32+09:00 Subject: Re: rake/rdoc problem On Monday 07 November 2005 11:02, Kev Jackson wrote: > Hi, > > I'm getting this error when I try to execute the rdoc task from > rake > > undefined method `exitstatus' for nil:NilClass > > My rakefile looks like... > > require 'rake' > require 'rake/rdoctask' > > Rake::RDocTask.new { |rdoc| > rdoc.rdoc_dir = 'doc' > rdoc.title = "Title" > rdoc.options << '--line-numbers --inline-source' > rdoc.main ="README" > rdoc.rdoc_files.include('README') > rdoc.rdoc_files.include('lib/*.rb') > rdoc.rdoc_files.exclude('_darcs/**/*.rb') > } > > running the rdoc command manually creates the documentation > > rdoc -o doc --line-numbers --inline-source --main 'README' --title > 'Title' -T 'html' README lib/*.rb --exclude _darcs/**/*.* > > except it creates docs for files in the darcs repo (which I'd > rather it didn't) and it cannot find my README file, but the file > is present in the directory from which the command is executed. > > I assume I'm being dense It is a limit of the batch script that starts rdoc on Windows. It delegates only the first 8 arguments. The rest will be silently cut off. From an answer of myself to a similar post: > Some options for you: > > * Replace the Rake::RDocTask with: > > � � task "rdoc" do > � � � � require 'rdoc/rdoc' > � � � � # give the same arguments as to rdoc from commandline > � � � � # try "rdoc --help" > � � � � RDoc::RDoc.new.document(%w(--title rrt_ruby -T html .....)) > � � end > > � � (The problem with invoking rdoc from the commandline on > � � �Windows is, that a batch file is the start script which > � � �takes only 8 (or something like that) arguments.) > > * Use Rant: http://make.ruby-co.de > � It's easy to convert a Rakefile to a Rantfile. HTH, � Stefan