# Ri, rdoc, gems, and rails

**URL:** <https://www.ruby-forum.com/t/ri-rdoc-gems-and-rails/98803>\
**Category:** Ruby\
**Created:** [July 18, 2006, 8:41am UTC](https://www.ruby-forum.com/t/ri-rdoc-gems-and-rails/98803 "2006-07-18T08:41:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lstrecv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e68b1a/32.png) [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Post date:** [July 18, 2006, 8:41am UTC](https://www.ruby-forum.com/t/ri-rdoc-gems-and-rails/98803/1 "2006-07-18T08:41:21Z")

</div>

One great new feature of rubygems 0.9 is that we now have ri for  
installed gems as well.

That’s super!

I’m not getting this for rails, even though I have the gems installed.  
Why is this, and how can I add rails’ to ri?

---

<div class="post-metadata">

**Author:** ![lstrecv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e68b1a/32.png) [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Post date:** [July 18, 2006, 8:47am UTC](https://www.ruby-forum.com/t/ri-rdoc-gems-and-rails/98803/2 "2006-07-18T08:47:33Z")

</div>

On Jul 17, 2006, at 11:40 PM, removed\_email\_address@domain.invalid wrote:

> One great new feature of rubygems 0.9 is that we now have ri for  
> installed gems as well.
> 
> That’s super!
> 
> I’m not getting this for rails, even though I have the gems installed.  
> Why is this, and how can I add rails’ to ri?

You need to use gemri (comes with rubygems) if you are on Ruby 1.8.4  
or older.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

---

<div class="post-metadata">

**Author:** ![lstrecv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e68b1a/32.png) [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Post date:** [July 18, 2006, 9:11am UTC](https://www.ruby-forum.com/t/ri-rdoc-gems-and-rails/98803/3 "2006-07-18T09:11:56Z")

</div>

Eric H. wrote:

> You need to use gemri (comes with rubygems) if you are on Ruby 1.8.4  
> or older.

C:\>gemri -c | grep -i acti  
Abbrev, ActionWebService, Archive, Archive::Tar, ArgumentError,  
Net::SSH::UserAuth::Methods::KeyboardInteractive,

No rails.

---

<div class="post-metadata">

**Author:** ![lstrecv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e68b1a/32.png) [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Post date:** [July 18, 2006, 5:12pm UTC](https://www.ruby-forum.com/t/ri-rdoc-gems-and-rails/98803/4 "2006-07-18T17:12:28Z")

</div>

I’m finding that I get gemdocs even with ri, but not for all packages.

I get them for Rails’ plugins, for instance, but not for rails proper.  
Does anyone know how I can control which ones appear?

Also, a problem is when a plugin or monkeypatch adds things to a class

- they know appear in the class’s ri, even when that extension is only  
part of a particular lib. Is there a way to shut this off?

---

<div class="post-metadata">

**Author:** ![lstrecv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e68b1a/32.png) [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Post date:** [July 18, 2006, 6:12pm UTC](https://www.ruby-forum.com/t/ri-rdoc-gems-and-rails/98803/5 "2006-07-18T18:12:39Z")

</div>

On Jul 18, 2006, at 12:10 AM, removed\_email\_address@domain.invalid wrote:

> Eric H. wrote:
> 
> > You need to use gemri (comes with rubygems) if you are on Ruby 1.8.4  
> > or older.
> 
> C:\>gemri -c | grep -i acti  
> Abbrev, ActionWebService, Archive, Archive::Tar, ArgumentError,  
> Net::SSH::UserAuth::Methods::KeyboardInteractive,
> 
> No rails.

ActionWebService is part of Rails.

You probably need to build the rest of the ri information.

gem rdoc --no-rdoc --ri gemname

for each part of Rails.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

---

<div class="post-metadata">

**Author:** ![lstrecv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e68b1a/32.png) [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Post date:** [July 18, 2006, 6:19pm UTC](https://www.ruby-forum.com/t/ri-rdoc-gems-and-rails/98803/6 "2006-07-18T18:19:30Z")

</div>

On Jul 18, 2006, at 8:10 AM, removed\_email\_address@domain.invalid wrote:

> I’m finding that I get gemdocs even with ri, but not for all packages.

You will need to generate the ri for packages built before 0.9.0.  
These packages never built their ri documentation.

> I get them for Rails’ plugins, for instance, but not for rails proper.  
> Does anyone know how I can control which ones appear?

gem rdoc --no-rdoc --ri gemname

will add them. If you want to remove them permanently you can delete  
them out of the gem’s doc dir. If you want to suppress them install  
ruby from CVS and use the new flags to ri, --system, --site, --gems,  
and --home.

> Also, a problem is when a plugin or monkeypatch adds things to a class
> 
> - they know appear in the class’s ri, even when that extension is only  
> part of a particular lib. Is there a way to shut this off?

A CVS ruby has ri options for this. I also have a half-updated gemri  
that will allow you to show ri only for a gem. I’ll finish it and  
add it to rubygems sometime after 1.8.5p2 because it depends on  
features that don’t exist yet.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

---

<div class="post-metadata">

**Author:** ![lstrecv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e68b1a/32.png) [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Post date:** [July 18, 2006, 10:56pm UTC](https://www.ruby-forum.com/t/ri-rdoc-gems-and-rails/98803/7 "2006-07-18T22:56:58Z")

</div>

Thank you, Eric, for the great info. I followed your directions and  
they worked beautifully.
