# How to get rdoc documentation with merb\_generator?

**URL:** <https://www.ruby-forum.com/t/how-to-get-rdoc-documentation-with-merb-generator/196958>\
**Category:** Ruby\
**Created:** [May 11, 2009, 1:50pm UTC](https://www.ruby-forum.com/t/how-to-get-rdoc-documentation-with-merb-generator/196958 "2009-05-11T13:50:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gernot\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/54ee81/32.png) [@Gernot\_H](https://www.ruby-forum.com/u/Gernot_H)\
**Post date:** [May 11, 2009, 1:50pm UTC](https://www.ruby-forum.com/t/how-to-get-rdoc-documentation-with-merb-generator/196958/1 "2009-05-11T13:50:30Z")

</div>

Hi all,

Our company spent a year programming with hardly any documentation. I’ve  
spent the last two weeks adding this in rdoc format to the controller  
and various library files. So now I need to generate the actual  
documentation. I ran into some trouble:-

Our app has two branches historically. The older one has apps for which  
merb-gen generated an empty ‘doc’ directory (well, I don’t know if it  
was completely empty, but it gave me no issues). So I could run rdoc in  
the branch root and this generated documentation smoothly in ‘doc/rdoc’  
no problem. GOOD!

The newer branch has apps for which merb-gen generated a doc directory  
containing ‘rdoc’ and ‘rdoc/generators’ where there is a  
‘merb\_generator.rb’ file. Now when I try to run rdoc from the branch  
root I get an error message telling me to specify the rdoc target  
directory to avoid overwriting existing documentation (currently there  
isn’t any, see below). OOPS!

So I wonder how can doc/rdoc/generators/merb\_generator.rb be used to do  
the job instead (which I assume is why it is generated by merb-gen)…

Reading the source code was interesting but unhelpful for my level of  
understanding of merb’s structure. I tried to run it with merb -r  
without any effect. Also I could not find a single tutorial or  
documentation online in the merb site, merbist, or dozens of  
merb-related blogs. Hmmm, I think I am missing something so basic  
everyone knows it!

Any help appreciated. Many thanks in advance,  
Gernot
