RDOC generation broken in 1.8.1

C

Chris White

I'm very new to Ruby, but I have successfully built and installed Ruby 1.8.1
from the source code (using the VC7 compiler). However, when I use rdoc to
generate Ruby documentation, I get the following error messages towards the
end of the rdoc process:

Generating CHM...
E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:419:in
`build_method_detail_list': undefined
method `as_href' for nil:NilClass (NoMethodError)
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:416:in
`map'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:416:in
`build_method_detail_list
'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:401:in
`each'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:401:in
`build_method_detail_list
'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:399:in
`each'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:399:in
`build_method_detail_list
'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:398:in
`each'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:398:in
`build_method_detail_list
'
... 8 levels...
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1087:in
`generate'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/chm_generator.rb:38:in
`generate'
from E:/Ruby/lib/ruby/1.8/rdoc/rdoc.rb:210:in `document'
from E:/Ruby/bin/rdoc.bat:70


I am using the following command line for rdoc:

rdoc --fmt chm --op E:\Ruby\doc


ruby --version outputs: ruby 1.8.1 (2003-12-25) [i386-mswin32]

Am I doing something wrong here, or is there an rdoc bug? It does generate
a bunch of html files in E:\Ruby\doc, but there also appear to be missing a
bunch of files, plus the .chm file is never generated. Thanks.

-Chris
 
D

Dave Thomas

I'm very new to Ruby, but I have successfully built and installed Ruby
1.8.1
from the source code (using the VC7 compiler). However, when I use
rdoc to
generate Ruby documentation, I get the following error messages
towards the
end of the rdoc process:

Chris:

Sorry about this: we're in the middle of a process of transition, and
I've neglected the Windows side of RDoc while I'm working on the ri
integration. I've probably broken something on the CHM generation side.

I'll look at this just as soon as I can.

Cheers


Dave


Cheers

Dave
 
C

Chris White

Ok, I think I figured out what I was doing wrong. After I built Ruby 1.8.1,
I ran "nmake DESTDIR=<installdir> install" to install Ruby to another
directory. Then, I ran rdoc on the "installed" version of Ruby, not the
source code version of Ruby. I guess rdoc needs access to all the source
(which, of course, does not all get installed to the INSTALL directory).

-Chris
 
C

Chris White

Ok, the only way I can get this to work is to run rdoc from the lib
directory of the source distribution. But, when I run in the lib directory
of the installed Ruby tree, it fails. Then, when I go to the "ext"
directory in the Ruby source distribution, and run rdoc, it fails there. I
guess that the "lib" directory in the installed version of Ruby is made up
of files from both "ext" and "lib" in the original Ruby source distribution,
and that a file from "ext" is causing the problem with rdoc.


Chris White said:
Ok, I think I figured out what I was doing wrong. After I built Ruby 1.8.1,
I ran "nmake DESTDIR=<installdir> install" to install Ruby to another
directory. Then, I ran rdoc on the "installed" version of Ruby, not the
source code version of Ruby. I guess rdoc needs access to all the source
(which, of course, does not all get installed to the INSTALL directory).

-Chris


Chris White said:
I'm very new to Ruby, but I have successfully built and installed Ruby 1.8.1
from the source code (using the VC7 compiler). However, when I use rdoc to
generate Ruby documentation, I get the following error messages towards the
end of the rdoc process:

Generating CHM...
E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:419:in
`build_method_detail_list': undefined
method `as_href' for nil:NilClass (NoMethodError)
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:416:in
`map'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:416:in
`build_method_detail_list
'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:401:in
`each'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:401:in
`build_method_detail_list
'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:399:in
`each'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:399:in
`build_method_detail_list
'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:398:in
`each'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:398:in
`build_method_detail_list
'
... 8 levels...
from E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1087:in
`generate'
from E:/Ruby/lib/ruby/1.8/rdoc/generators/chm_generator.rb:38:in
`generate'
from E:/Ruby/lib/ruby/1.8/rdoc/rdoc.rb:210:in `document'
from E:/Ruby/bin/rdoc.bat:70


I am using the following command line for rdoc:

rdoc --fmt chm --op E:\Ruby\doc


ruby --version outputs: ruby 1.8.1 (2003-12-25) [i386-mswin32]

Am I doing something wrong here, or is there an rdoc bug? It does generate
a bunch of html files in E:\Ruby\doc, but there also appear to be
missing
a
bunch of files, plus the .chm file is never generated. Thanks.

-Chris
 
D

Dave Thomas

Ok, the only way I can get this to work is to run rdoc from the lib
directory of the source distribution. But, when I run in the lib
directory
of the installed Ruby tree, it fails. Then, when I go to the "ext"
directory in the Ruby source distribution, and run rdoc, it fails
there. I
guess that the "lib" directory in the installed version of Ruby is
made up
of files from both "ext" and "lib" in the original Ruby source
distribution,
and that a file from "ext" is causing the problem with rdoc.

Ah - I suspect you may have an old copy of RDoc lying around that's
somehow getting mixed up with the new one. I thought I'd handled that,
but it might be that if your various paths are non-standard I haven't
tried those cases.

To get you up and running, try removing all the installed versions of
RDoc and ri, where ever they are, and then run the installation again
to re-install them.

Thanks


Dave
 
C

Chris White

Dave, thanks for the quick response. Unfortunately, the only version of
RDoc that I have is the 1.8.1. I had already removed the older 1.8.0
version.

Just to summarize the problem... I've looked through the RDoc README, and it
looks like I've got everything set up correctly. When I built Ruby 1.8.1,
and did the "nmake install" step, my Ruby install directory looked like:

E:\RUBY
????bin
????lib
? ????ruby
? ????1.8
? ? ????bigdecimal
? ? ????cgi
? ? ? ????session
? ? ????date
? ? ????dl
? ? ????drb
? ? ????i386-mswin32
? ? ? ????digest
? ? ? ????racc
? ? ? ????win32
? ? ????irb
? ? ? ????cmd
? ? ? ????ext
? ? ? ????lc
? ? ? ????ja
? ? ????net
? ? ????optparse
? ? ????racc
? ? ????rdoc
? ? ? ????dot
? ? ? ????generators
? ? ? ? ????template
? ? ? ? ????chm
? ? ? ? ????html
? ? ? ? ????xml
? ? ? ????markup
? ? ? ? ????sample
? ? ? ? ????simple_marku
? ? ? ? ????test
? ? ? ????parsers
? ? ? ????ri
? ? ????rexml
? ? ? ????dtd
? ? ? ????encodings
? ? ? ????light
? ? ? ????parsers
? ? ????rinda
? ? ????runit
? ? ? ????cui
? ? ????shell
? ? ????soap
? ? ? ????encodingstyle
? ? ? ????mapping
? ? ? ????rpc
? ? ????test
? ? ? ????unit
? ? ? ????collector
? ? ? ????ui
? ? ? ? ????console
? ? ? ? ????fox
? ? ? ? ????gtk
? ? ? ? ????gtk2
? ? ? ? ????tk
? ? ? ????util
? ? ????uri
? ? ????webrick
? ? ? ????httpauth
? ? ? ????httpservlet
? ? ????win32
? ? ????win32ole
? ? ????wsdl
? ? ? ????soap
? ? ? ????xmlSchema
? ? ????xmlrpc
? ? ????xsd
? ? ? ????xmlparser
? ? ????yaml
? ????site_ruby
? ????1.8
? ????i386-msvcrt
????man
????man1

My path contains E:\Ruby\bin, and there are no other references in the path
to other versions of Ruby (and in fact, there are no other versions
installed on the machine). When I run RDoc from E:\Ruby\lib, it fails with
the errors mentioned in a previous post. Unfortunately, I'm still a Ruby
newbie, otherwise I'd debug this and post a solution.

Again, thanks for the responses Dave.

-Chris
 
D

Dave Thomas

I'm very new to Ruby, but I have successfully built and installed Ruby
1.8.1
from the source code (using the VC7 compiler). However, when I use
rdoc to
generate Ruby documentation, I get the following error messages
towards the
end of the rdoc process:

Generating CHM...
E:/Ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:419:in
`build_method_detail_list': undefined

This is fixed in the latest CVS: it was a conventional bug (jcode
extended class String, and aliases a public method, making the original
private. When it came time to display the name of the aliases method,
it wasn't present (because RDoc wasn't run with the --all flag), so the
generator barfed).

However, when I now run the CHM generation under windows, Microsoft's
hcc dies with the error:

Runtime error R6002: floating point not loaded

It might be something to do with the fact that some of the HTML I'm
feeding it has unescaped '<' characters in method definitions (a bug in
RDoc that's on the list to fix), but if anyone knows for sure what the
error means I'd be grateful.


Cheers


Dave
 

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

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,079
Latest member
ElidaWarin

Latest Threads

Top