Rdoc and ri for gem/non-gem installs

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?

On Mar 23, 10:55 pm, “braver” [email protected] 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

– 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

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?

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?

On Mar 24, 1:37 pm, “braver” [email protected] 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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs