Newbie: More problems with RDoc

X

Xeon

Hi,

I'm having troubles using rdoc. I'm using ruby 1.8.1 VC++ build
downloaded from Ruby main site (zipped download), and install it by
unzipping it to C:\Ruby directory, and add C:\Ruby\Bin to path
(manually). The box is 98Lite patched Win98SE with 4DOS command shell.

Here are the problems, assuming I run RDoc in C:\temp\3 directory,
wanting to create docs for FxRuby's chore.rb:

1. The command:
rdoc -f html c:\ruby\lib\ruby\site_ruby\1.8\fox\chore.rb
rdoc -o c:\temp\3\doc -f html
c:\ruby\lib\ruby\site_ruby\1.8\fox\chore.rb

The following error message displayed:

Generating HTML...
C:/ruby/lib/ruby/1.8/ftools.rb:140: in 'mkdir' : No such file or
directory - files/c (Errno::ENOENT)
from C:/ruby/lib/ruby/1.8/ftools.rb:140: in 'makedirs'
from C:/ruby/lib/ruby/1.8/ftools.rb:133: in 'each'
from C:/ruby/lib/ruby/1.8/ftools.rb:133: in 'makedirs'
from C:/ruby/lib/ruby/1.8/ftools.rb:136: in 'makedirs'
from C:/ruby/lib/ruby/1.8/ftools.rb:133: in 'each'
from C:/ruby/lib/ruby/1.8/ftools.rb:133: in 'makedirs'
from C:/ruby/lib/ruby/1.8/ftools.rb:136: in 'makedirs'
from C:/ruby/lib/ruby/1.8/ftools.rb:133: in 'each'
... 16 levels ...
from C:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1162:
in 'generate_html'
from C:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1087:
in 'generate'
from C:/ruby/lib/ruby/1.8/rdoc/rdoc.rb:210: in 'document'
from C:/ruby/bin/rdoc.bat:70

It seemed that in some point, rdoc couldn't generate 'doc/files/c'
directory. That's odd, because to following directory tree is created:

C:\TEMP\3\doc\created.rid
C:\TEMP\3\doc\rdoc-style.css
C:\TEMP\3\doc\classes
C:\TEMP\3\doc\classes\Fox
C:\TEMP\3\doc\classes\Fox\.
C:\TEMP\3\doc\classes\Fox\..
C:\TEMP\3\doc\classes\Fox\FXApp.src
C:\TEMP\3\doc\classes\Fox\FXApp.src\M000001.html
C:\TEMP\3\doc\files

2. When creating diagrams with the command line
rdoc -o c:\temp\3\doc -d -f html
c:\ruby\lib\ruby\site_ruby\1.8\fox\chore.rb

The following error displayed:

Generating HTML...
Diagrams: C:\ruby/lib/ruby/1.8/rdoc/diagram.rb:313: in ''' : No
such file or directory - dot -Tismap dot/f_0.dot (Errno::ENOENT)
from C:/ruby/lib/ruby/1.8/rdoc/diagram.rb:313: in
'wrap_in_image_map'
from C:/ruby/lib/ruby/1.8/rdoc/diagram.rb:303: in
'convert_to_png'
from C:/ruby/lib/ruby/1.8/rdoc/diagram.rb:76: in 'draw'
from C:/ruby/lib/ruby/1.8/rdoc/diagram.rb:53: in
'each_with_index'
from C:/ruby/lib/ruby/1.8/rdoc/diagram.rb:53: in 'each'
from C:/ruby/lib/ruby/1.8/rdoc/diagram.rb:53: in
'each_with_index'
from C:/ruby/lib/ruby/1.8/rdoc/diagram.rb:53: in 'draw'
from C:/ruby/lib/ruby/1.8/rdoc/rdoc.rb:209: in 'document'
from C:/ruby/bin/rdoc.bat:70

The file c:\temp\3\doctest\dot\f_0.dot is actually exist.

3. Creating CHM with command:
rdoc -o c:\temp\3\doc -f chm
c:\ruby\lib\ruby\site_ruby\1.8\fox\chore.rb

Rdoc whines that it couldn't find hh.exe in C:\Program Files\HTML Help
Workshop. I actually have installed HTML Help Workshop, just in
different directory. Why does the path to hh.exe hardcoded like that?

When hh.exe path is resolved (by renaming the HTML workshop
installation path), it encountered the same problem with no #1.

4. Creating Ri docs with command:
rdoc --ri c:\ruby\lib\ruby\site_ruby\1.8\fox\chore.rb

The following error displayed:

Generating RI
C:/ruby/lib/ruby/1.8/rdoc/rdoc.rb:95: in 'exist?' : cannot convert
nil to String (TypeError)
from C:/ruby/lib/ruby/1.8/rdoc/rdoc.rb:95: in 'setup_output_dir'
from C:/ruby/lib/ruby/1.8/rdoc/rdoc.rb:204: in 'document'
from C:/ruby/bin/rdoc.bat:70

When I use the command line
rdoc -o c:\temp\3\doctest -f ri
c:\ruby\lib\ruby\site_ruby\1.8\fox\chore.rb

the documentation generated flawlessly. It's just ri couldn't find it.
Just where is the default path ri searched? How can I specify explicit
directory to ri?

5. Creating XML docs with command:
rdoc -f xml c:\ruby\lib\ruby\site_ruby\1.8\fox\chore.rb

Basically it runs fine, just the resulting xml is dumped to stdout. I
just pipe it to some file. Now, how can I convert the resulting XML
file into HTML?

Plz help

TIA
 
D

Dave Thomas

1. The command:
rdoc -f html c:\ruby\lib\ruby\site_ruby\1.8\fox\chore.rb
rdoc -o c:\temp\3\doc -f html
c:\ruby\lib\ruby\site_ruby\1.8\fox\chore.rb

Try running it in the directory where the .rb file is: it might be
having problems with the \'s in the path names

3. Creating CHM with command:
rdoc -o c:\temp\3\doc -f chm
c:\ruby\lib\ruby\site_ruby\1.8\fox\chore.rb

Rdoc whines that it couldn't find hh.exe in C:\Program Files\HTML Help
Workshop. I actually have installed HTML Help Workshop, just in
different directory. Why does the path to hh.exe hardcoded like that?

Gosh, don't you just hate things that whine? :)

No idea why it's hard wired: possibly because it isn't on the path by
default, and therefore if there's no path RDoc can't find it anywhere.
I'm open to suggestions... :)



Cheers

Dave
 
X

Xeon

Dave Thomas said:
Try running it in the directory where the .rb file is: it might be
having problems with the \'s in the path names
It works. Thx. Why doesn't I think of that... It seemed it have to do
with directory depth, cause it works when the .rb files are 2 to 3
directories down. I wonder why?
No idea why it's hard wired: possibly because it isn't on the path by
default, and therefore if there's no path RDoc can't find it anywhere.
I'm open to suggestions... :)
Well, it can be defaulted like the hardwired value, but can be
overriden, like -o option of RDoc, or RDoc just create all the
necessary files for hh.exe to compile, and let the user call compile
the files to CHM manually (RDoc doesn't directly call hh.exe).

TIA
 

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

Similar Threads


Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top