Rake/rdoc problem

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

Kev

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

Are you on Windows?

James

···

--

http://www.ruby-doc.org - Ruby Help & Documentation
Ruby Code & Style - Ruby Code & Style (looking for writers!)
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
http://www.30secondrule.com - Building Better Tools

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 &quot;rdoc&quot; do
    require &#39;rdoc/rdoc&#39;
    \# give the same arguments as to rdoc from commandline
    \# try &quot;rdoc \-\-help&quot;
    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

···

On Monday 07 November 2005 11:02, Kev Jackson wrote:

James Britt wrote:

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

Are you on Windows?

James

unfortunately yes I'm on Windows

Kev

Kev Jackson wrote:

James Britt wrote:

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

Are you on Windows?

James

unfortunately yes I'm on Windows

Then I believe this is a known issue with Rake.

James

···

--

http://www.ruby-doc.org - Ruby Help & Documentation
Ruby Code & Style - Ruby Code & Style (we're looking for writers!)
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
http://www.30secondrule.com - Building Better Tools

James Britt wrote:

Kev Jackson wrote:

James Britt wrote:

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

Are you on Windows?

James

unfortunately yes I'm on Windows

Then I believe this is a known issue with Rake.

Which is fixed in latest from Rake's repository (I discovered it because I had a patch ready for another task - which reminds me, I need to post it but hey, it's been three hectic weeks).
Seems like it's time Jim makes a release.
Cheers,
V.-

···

--
http://www.braveworld.net/riva

____________________________________________________________________
http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ.
http://www.freemail.gr - free email service for the Greek-speaking.