# RI documentation for RubyGems

**URL:** <https://rubytalk.org/t/ri-documentation-for-rubygems/26736>\
**Category:** ruby-talk\
**Created:** [18 April 2006 20:12 UTC](https://rubytalk.org/t/ri-documentation-for-rubygems/26736 "2006-04-18T20:12:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wes\_Gamble](https://avatars.discourse-cdn.com/v4/letter/w/258eb7/32.png) [@Wes\_Gamble](https://rubytalk.org/u/Wes_Gamble)\
**Post date:** [18 April 2006 20:12 UTC](https://rubytalk.org/t/ri-documentation-for-rubygems/26736/1 "2006-04-18T20:12:45Z")

</div>

Can anyone explain how the RI documentation for RubyGems may be:

1) generated

2) subsequently accessed via RI?

Any info. is appreciated - my research tells me that this is/may be  
working but it's unclear. Sounds like a relatively recent development.

Thanks,  
Wes

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Phil\_Hagelberg1](https://avatars.discourse-cdn.com/v4/letter/p/b5ac83/32.png) [@Phil\_Hagelberg1](https://rubytalk.org/u/Phil_Hagelberg1)\
**Post date:** [18 April 2006 20:33 UTC](https://rubytalk.org/t/ri-documentation-for-rubygems/26736/2 "2006-04-18T20:33:35Z")

</div>

Wes Gamble \<weyus@att.net\> writes:

> Can anyone explain how the RI documentation for RubyGems may be:
> 
> 1) generated
> 
> 2) subsequently accessed via RI?

I think if you do an 'rdoc -R' in your gems directory it will create  
ri-accessible documentation. When I did this, it took an exceedingly  
long time to finish, so I'm wondering if there's a better way to do  
it.

-Phil Hagelberg

---

<div class="post-metadata">

**Author:** ![Ross\_Bamford4](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@Ross\_Bamford4](https://rubytalk.org/u/Ross_Bamford4)\
**Post date:** [18 April 2006 21:21 UTC](https://rubytalk.org/t/ri-documentation-for-rubygems/26736/3 "2006-04-18T21:21:09Z")

</div>

If you don't care about the regular rdoc (for gem\_server), this might  
help:

[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/175337](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/175337)

> **···**
>
> On Wed, 2006-04-19 at 05:12 +0900, Wes Gamble wrote:
> 
> > Can anyone explain how the RI documentation for RubyGems may be:
> > 
> > 1) generated
> > 
> > 2) subsequently accessed via RI?
> 
> --  
> Ross Bamford - rosco@roscopeco.REMOVE.co.uk

---

<div class="post-metadata">

**Author:** ![Jim\_Weirich1](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@Jim\_Weirich1](https://rubytalk.org/u/Jim_Weirich1)\
**Post date:** [19 April 2006 00:21 UTC](https://rubytalk.org/t/ri-documentation-for-rubygems/26736/4 "2006-04-19T00:21:49Z")

</div>

Wes Gamble wrote:

> Can anyone explain how the RI documentation for RubyGems may be:
> 
> 1) generated
> 
> 2) subsequently accessed via RI?
> 
> Any info. is appreciated - my research tells me that this is/may be  
> working but it's unclear. Sounds like a relatively recent development.

This won't help you immediately, but the next version of rubygems will  
generate the RI docs for each installed gem automatically. We will  
probabaly release a gemri command that will pick up the gem'ed RI docs  
as well. (gemri is just a simple wrapper that setups up the right  
paths).

> **···**
>
> --  
> -- Jim Weirich
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Wes\_Gamble](https://avatars.discourse-cdn.com/v4/letter/w/258eb7/32.png) [@Wes\_Gamble](https://rubytalk.org/u/Wes_Gamble)\
**Post date:** [18 April 2006 20:44 UTC](https://rubytalk.org/t/ri-documentation-for-rubygems/26736/5 "2006-04-18T20:44:04Z")

</div>

Phil,

Which directory is the correct one to do it in?

Wes

Phil Hagelberg wrote:

> **···**
>
> > Wes Gamble \<weyus@att.net\> writes:
> > 
> > > Can anyone explain how the RI documentation for RubyGems may be:
> > > 
> > > 1) generated
> > > 
> > > 2) subsequently accessed via RI?
> > 
> > I think if you do an 'rdoc -R' in your gems directory it will create  
> > ri-accessible documentation. When I did this, it took an exceedingly  
> > long time to finish, so I'm wondering if there's a better way to do  
> > it.
> > 
> > -Phil Hagelberg
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Phil\_Hagelberg1](https://avatars.discourse-cdn.com/v4/letter/p/b5ac83/32.png) [@Phil\_Hagelberg1](https://rubytalk.org/u/Phil_Hagelberg1)\
**Post date:** [18 April 2006 20:55 UTC](https://rubytalk.org/t/ri-documentation-for-rubygems/26736/6 "2006-04-18T20:55:50Z")

</div>

Wes Gamble \<weyus@att.net\> writes:

> Which directory is the correct one to do it in?

On my system (Ubuntu) it's /usr/lib/ruby/gems/1.8/gems/

I don't know that it would be consistent across platforms.

-Phil Hagelberg

---

<div class="post-metadata">

**Author:** ![Dave\_Howell2](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@Dave\_Howell2](https://rubytalk.org/u/Dave_Howell2)\
**Post date:** [19 April 2006 00:13 UTC](https://rubytalk.org/t/ri-documentation-for-rubygems/26736/7 "2006-04-19T00:13:02Z")

</div>

Doesn't that depend on the question? If Wes wants documentation for Gems that he has installed, on my system, they're in (installation root)/lib/ruby/gems/1.8/gems/(individual gems)

However, RubyGems couldn't install itself as a Gem, so it's in (installation root)/lib/ruby/site\_ruby/1.8/rubygems

On Mac OSX, (installation root) has defaulted to /usr/local, although I installed Ruby 1.8.4 in /Library/Ruby instead.

To make ri documentation for RubyGems itself, you'd go to the latter directory, then run rdoc. You'll have to figure out if you want to use -r or -R. I got tired of playing guessing games with ri, so I generate all my RDoc files as HTML now.

> **···**
>
> On Apr 18, 2006, at 13:55, Phil Hagelberg wrote:
> 
> > Wes Gamble \<weyus@att.net\> writes:
> > 
> > > Which directory is the correct one to do it in?
> > 
> > On my system (Ubuntu) it's /usr/lib/ruby/gems/1.8/gems/
> > 
> > I don't know that it would be consistent across platforms.
