# Getting gem rdoc via ri?

**URL:** <https://www.ruby-forum.com/t/getting-gem-rdoc-via-ri/98037>\
**Category:** Rails\
**Created:** [January 27, 2006, 8:45pm UTC](https://www.ruby-forum.com/t/getting-gem-rdoc-via-ri/98037 "2006-01-27T20:45:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![princenamor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c0e974/32.png) [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Post date:** [January 27, 2006, 8:45pm UTC](https://www.ruby-forum.com/t/getting-gem-rdoc-via-ri/98037/1 "2006-01-27T20:45:20Z")

</div>

Guys,

I’m working with the new RadRails release (0.5.3), which has a very  
nifty inclusion of ri courtesy of RDT.

Problem is, although I’ve generated rdoc for all installed gems with  
“gem rdoc --all”, it’s not accessible through ri. I see some posts here  
and there about rimport…is this still the necessary way to incorporate  
the rails rdoc into ri?

Thanks!  
John

---

<div class="post-metadata">

**Author:** ![princenamor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c0e974/32.png) [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Post date:** [January 30, 2006, 6:50pm UTC](https://www.ruby-forum.com/t/getting-gem-rdoc-via-ri/98037/2 "2006-01-30T18:50:18Z")

</div>

This is a great tip… Thanks a TON…

---

<div class="post-metadata">

**Author:** ![princenamor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c0e974/32.png) [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Post date:** [January 30, 2006, 3:34pm UTC](https://www.ruby-forum.com/t/getting-gem-rdoc-via-ri/98037/3 "2006-01-30T15:34:21Z")

</div>

Guys,

## I posted my question to the Ruby list and got a few very good responses…here was my solution, FYR:

Apparently, someone had already thought of doing this and didn’t, as  
evidenced by the following lines in rubygems/doc\_manager.rb:

#TODO: Why is this throwing an error?  
#ri = RDoc::RDoc.new  
#ri.document([’-R’] + source\_dirs)

Anyway, I was successful…I’ll look at making this more integrated and  
submitting as a patch, but for the quick hack all it took was changing  
the following line (58 in my version):

r.document([’–quiet’, ‘–op’, rdoc\_dir] + @rdoc\_args.flatten +  
source\_dirs)

to:

r.document([’–quiet’, ‘–op’, ‘–merge’, ‘-r’, ‘–ri-system’, rdoc\_dir]

- @rdoc\_args.flatten + source\_dirs)

It worked perfectly…all Rails classes, etc, are now in ri.

Thanks guys!

John
