Monday, May 28, 2007

Unlocking Dark Secrets of rdoc/ri

So if you are not using the one-click installer (like anyone who compiles from source ) on Windows, ri/fxri is pretty useless. Not only don't your GEMs show, but anything else you've compiled doesn't either.

So how do you fix this?

Install it with rdoc -R from within the directory that has the .rb

# rdoc -R oniguruma.rb
oniguruma.rb: mcc..........c....c.....
Generating RI...

Files: 1
Classes: 4
Modules: 1
Methods: 19
Elapsed: 2.334s
Make sure it is there with ri -l

franz-g4:/my/src/oniguruma-1.1.0/lib root# ri -l | grep Oni
Oniguruma
Oniguruma::ORegexp
Oniguruma::ORegexp::escape
Oniguruma::ORegexp::last_match
Oniguruma::ORegexp::new
Oniguruma::ORegexp#==
Oniguruma::ORegexp#casefold?
Oniguruma::ORegexp#eql?
Oniguruma::ORegexp#inspect
Oniguruma::ORegexp#kcode
Oniguruma::ORegexp#options
Oniguruma::ORegexp#source
Oniguruma::ORegexp#to_s

On a related note segment7 has some nice blog entries on documentation

No comments: