# Newbie: More problems with RDoc

**URL:** https://rubytalk.org/t/newbie-more-problems-with-rdoc/12764
**Category:** ruby-talk
**Created:** [26 July 2004 19:51 UTC](https://rubytalk.org/t/newbie-more-problems-with-rdoc/12764 "2004-07-26T19:51:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Xdblade](https://avatars.discourse-cdn.com/v4/letter/x/0ea827/32.png) [@Xdblade](https://rubytalk.org/u/Xdblade)
#### Post date: [26 July 2004 19:51 UTC](https://rubytalk.org/t/newbie-more-problems-with-rdoc/12764/1 "2004-07-26T19:51:51Z")

</div>

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:  
&nbsp;&nbsp;&nbsp;rdoc -f html c:\ruby\lib\ruby\site\_ruby\1.8\fox\chore.rb  
&nbsp;&nbsp;&nbsp;rdoc -o c:\temp\3\doc -f html  
c:\ruby\lib\ruby\site\_ruby\1.8\fox\chore.rb

The following error message displayed:

&nbsp;&nbsp;&nbsp;Generating HTML...  
&nbsp;&nbsp;&nbsp;C:/ruby/lib/ruby/1.8/ftools.rb:140: in 'mkdir' : No such file or  
directory - files/c (Errno::ENOENT)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/ftools.rb:140: in 'makedirs'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/ftools.rb:133: in 'each'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/ftools.rb:133: in 'makedirs'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/ftools.rb:136: in 'makedirs'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/ftools.rb:133: in 'each'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/ftools.rb:133: in 'makedirs'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/ftools.rb:136: in 'makedirs'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/ftools.rb:133: in 'each'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... 16 levels ...  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/rdoc/generators/html\_generator.rb:1162:  
in 'generate\_html'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/rdoc/generators/html\_generator.rb:1087:  
in 'generate'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/rdoc/rdoc.rb:210: in 'document'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rdoc -o c:\temp\3\doc -d -f html  
c:\ruby\lib\ruby\site\_ruby\1.8\fox\chore.rb

The following error displayed:

&nbsp;&nbsp;&nbsp;Generating HTML...  
&nbsp;&nbsp;&nbsp;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)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/rdoc/diagram.rb:313: in  
'wrap\_in\_image\_map'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/rdoc/diagram.rb:303: in  
'convert\_to\_png'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/rdoc/diagram.rb:76: in 'draw'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/rdoc/diagram.rb:53: in  
'each\_with\_index'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/rdoc/diagram.rb:53: in 'each'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/rdoc/diagram.rb:53: in  
'each\_with\_index'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/rdoc/diagram.rb:53: in 'draw'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/rdoc/rdoc.rb:209: in 'document'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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:  
&nbsp;&nbsp;&nbsp;rdoc --ri c:\ruby\lib\ruby\site\_ruby\1.8\fox\chore.rb

The following error displayed:

&nbsp;&nbsp;&nbsp;Generating RI  
&nbsp;&nbsp;&nbsp;C:/ruby/lib/ruby/1.8/rdoc/rdoc.rb:95: in 'exist?' : cannot convert  
nil to String (TypeError)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/rdoc/rdoc.rb:95: in 'setup\_output\_dir'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/lib/ruby/1.8/rdoc/rdoc.rb:204: in 'document'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from C:/ruby/bin/rdoc.bat:70

When I use the command line  
&nbsp;&nbsp;&nbsp;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:  
&nbsp;&nbsp;&nbsp;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

---

<div class="post-metadata">

### Author: ![Dave\_Mail\_Archive](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@Dave\_Mail\_Archive](https://rubytalk.org/u/Dave_Mail_Archive)
#### Post date: [26 July 2004 20:55 UTC](https://rubytalk.org/t/newbie-more-problems-with-rdoc/12764/2 "2004-07-26T20:55:45Z")

</div>

> 1. The command:  
> &nbsp;&nbsp;&nbsp;rdoc -f html c:\ruby\lib\ruby\site\_ruby\1.8\fox\chore.rb  
> &nbsp;&nbsp;&nbsp;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:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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

> **···**
>
> On Jul 26, 2004, at 14:51, Xeon wrote:

---

<div class="post-metadata">

### Author: ![Xdblade](https://avatars.discourse-cdn.com/v4/letter/x/0ea827/32.png) [@Xdblade](https://rubytalk.org/u/Xdblade)
#### Post date: [27 July 2004 11:00 UTC](https://rubytalk.org/t/newbie-more-problems-with-rdoc/12764/3 "2004-07-27T11:00:27Z")

</div>

Dave Thomas \<dave@pragprog.com\> wrote in message news:\<26E1696A-DF46-11D8-B8BD-000A95676A62@pragprog.com\>...

> 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
