rake/rdoc problem

K

Kev Jackson

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
 
J

James Britt

S

Stefan Lang

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 =3D 'doc'
rdoc.title =3D "Title"
rdoc.options << '--line-numbers --inline-source'
rdoc.main =3D"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.

=46rom an answer of myself to a similar post:
Some options for you:
=20
* Replace the Rake::RDocTask with:
=20
=A0 =A0 task "rdoc" do
=A0 =A0 =A0 =A0 require 'rdoc/rdoc'
=A0 =A0 =A0 =A0 # give the same arguments as to rdoc from commandline
=A0 =A0 =A0 =A0 # try "rdoc --help"
=A0 =A0 =A0 =A0 RDoc::RDoc.new.document(%w(--title rrt_ruby -T html .....= ))
=A0 =A0 end
=20
=A0 =A0 (The problem with invoking rdoc from the commandline on
=A0 =A0 =A0Windows is, that a batch file is the start script which
=A0 =A0 =A0takes only 8 (or something like that) arguments.)
=20
* Use Rant: http://make.ruby-co.de
=A0 It's easy to convert a Rakefile to a Rantfile.

HTH,
=A0 Stefan
 
D

Damphyr

James said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top