[Rubygems-developers] rdoc, ri, and gem integration?

John Gabriele jmg3000 at gmail.com
Sat Jun 3 18:58:59 EDT 2006

On 6/3/06, Jim Weirich <jim at weirichhouse.org> wrote:
> John Gabriele wrote:
> > Where does this cvs version of gem put the ri docs (yaml files) that
> > it generates?
> In the doc directory of the gem repository.

Ah, I guess that's: .../lib/ruby/gems/1.8/gems/foo-1.2.3/doc/ri

> >> The install and
> >> update commands supports both --rdoc and --ri switches.
> >
> > Just curious, is it the default behaviour to generate and install both
> > the rdoc->html and rdoc->yaml (ri) docs when you install a gem? If so,
> > then what's the point of those --rdoc and --ri switches?
> So you can say --no-rdoc and --no-ri

Ah. I see. Merely redundant.

> >>  The rdoc
> >> command can also generate rdoc and ri docs at any time for any installed
> >> command.
> >
> > Not sure what you mean by "installed command", but...
> Sorry, I meant any installed gem.
> > I see that rdoc can make ri docs for the core/std modules
> > (/opt/ruby-1.8.4/lib/ruby/1.8), and using the "--ri-system" option it
> > places them into /opt/ruby-1.8.4/share/ri/1.8/system.
> >
> > And that rdoc can make ri docs for site modules
> > (/opt/ruby-1.8.4/lib/ruby/site_ruby/1.8), and using the "--ri-site"
> > option it places them into /opt/ruby-1.8.4/share/ri/1.8/site.
> >
> > And that rdoc ran make ri docs for any of my random oddball modules,
> > and using the "--ri" option it places them into my own ~/.rdoc
> > directory (though that's not working for me at the moment),
> >
> > But rdoc doesn't seem to have an option for use when generating ri
> > docs for gems. Or does it?
> The gem rdoc command generates the RI docs too.  Is that what you are
> asking.

I'd naively assumed that gem uses the rdoc script behind the scenes to
generate the ri docs, and so was asking if there's a special option to
the rdoc command (like, for example, --ri-gems) to place generated ri
docs into a gem-specific directory.

Evidently, as you pointed out, with the newest version of RubyGems in
CVS, ri docs get generated automatically (by default) when you install
a gem. That's good news! :)

> > How do most folks currently go about having ri docs for installed gems?
> Most people don't yet,  the RI stuff is fairly recent.

I see.

Thanks for the replies Jim.


More information about the Rubygems-developers mailing list