# Rdoc and ri for gem/non-gem installs

**URL:** <https://www.ruby-forum.com/t/rdoc-and-ri-for-gem-non-gem-installs/89963>\
**Category:** Ruby\
**Created:** [March 24, 2007, 7:00am UTC](https://www.ruby-forum.com/t/rdoc-and-ri-for-gem-non-gem-installs/89963 "2007-03-24T07:00:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![braver](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a88e57/32.png) [@braver](https://www.ruby-forum.com/u/braver)\
**Post date:** [March 24, 2007, 7:00am UTC](https://www.ruby-forum.com/t/rdoc-and-ri-for-gem-non-gem-installs/89963/1 "2007-03-24T07:00:26Z")

</div>

I’ve been installing some gems, as well as non-gem tarballs, into my  
darwinports (now macports) ruby install on Darwin. Then, when I do  
ri, I can’t see the docs. Poking around /opt/local/lib/ruby shows  
that gems’ docs are generated next to them. How’s one supposed to  
look at them all – by using -d to ri and figuring out the path all  
the time?

---

<div class="post-metadata">

**Author:** ![braver](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a88e57/32.png) [@braver](https://www.ruby-forum.com/u/braver)\
**Post date:** [March 24, 2007, 7:40pm UTC](https://www.ruby-forum.com/t/rdoc-and-ri-for-gem-non-gem-installs/89963/2 "2007-03-24T19:40:47Z")

</div>

On Mar 23, 10:55 pm, “braver” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve been installing some gems, as well as non-gem tarballs, into my  
> darwinports (now macports) ruby install on Darwin. Then, when I do  
> ri, I can’t see the docs. Poking around /opt/local/lib/ruby shows  
> that gems’ docs are generated next to them. How’s one supposed to  
> look at them all – by using -d to ri and figuring out the path all  
> the time?

Found this by Dave:

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

– that’s 2004. What’s the status now, and specifically, why does gem  
install create ri docs next to gems? I’d like all ri docs to be  
centrally accessible – by a single ri command without options.

What should one ensure in ri setup (config files? env variable with -  
d paths?) to be able to access all site-ruby and gem-installed ri  
docs? And/or, what needs to be preset before the gem/local installs  
– so the ri docs, and rdoc html, all go to a central location?

And – what happens if I have a gem, but also a site-local install?

Cheers,  
Alexy

---

<div class="post-metadata">

**Author:** ![braver](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a88e57/32.png) [@braver](https://www.ruby-forum.com/u/braver)\
**Post date:** [March 27, 2007, 11:50am UTC](https://www.ruby-forum.com/t/rdoc-and-ri-for-gem-non-gem-installs/89963/3 "2007-03-27T11:50:55Z")

</div>

OK – to make the question really simple:

how do you consilidate all ri docs, and make sure new installs, both  
from gems and tarballs, keep them consolidated – available to ri  
without -d options?

---

<div class="post-metadata">

**Author:** ![braver](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a88e57/32.png) [@braver](https://www.ruby-forum.com/u/braver)\
**Post date:** [March 27, 2007, 10:20pm UTC](https://www.ruby-forum.com/t/rdoc-and-ri-for-gem-non-gem-installs/89963/4 "2007-03-27T22:20:00Z")

</div>

On Mar 23, 2007, at 23:00, braver wrote:

> I’ve been installing some gems, as well as non-gem tarballs, into my  
> darwinports (now macports) ruby install on Darwin. Then, when I do  
> ri, I can’t see the docs. Poking around /opt/local/lib/ruby shows  
> that gems’ docs are generated next to them. How’s one supposed to  
> look at them all – by using -d to ri and figuring out the path all  
> the time?

What version of Ruby are you using?

---

<div class="post-metadata">

**Author:** ![braver](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a88e57/32.png) [@braver](https://www.ruby-forum.com/u/braver)\
**Post date:** [May 6, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/rdoc-and-ri-for-gem-non-gem-installs/89963/5 "2007-05-06T21:46:17Z")

</div>

On Mar 24, 1:37 pm, “braver” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> And – what happens if I have a gem, but also a site-local install?
> 
> Cheers,  
> Alexy

Here’s how I got it to work:

Made a file named .gemrc in my home directory with contents “rdoc: –  
ri”  
Ran “gem rdoc --all”  
Had a nice beverage and waited a while.

Now ri finds classes from gems as well as system stuff. Makes ^H in  
TextMate very handy.
