rdoc and ri for gem/non-gem installs

B

braver

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?
 
B

braver

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
 
B

braver

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?
 
E

Eric Hodel

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?
 
J

jeem

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 togems? 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, andrdochtml, all go to a central location?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top