How regenerate ri data?

http://rubyforge.org/forum/forum.php?forum_id=25981:

  • ri now walks the ancestors of a class looking for a method e.g. ri
    File#read displays documentation for IO#read (may require regeneration of
    ri data)

Sounds cool! But:

Big-iMac-Attack:~ mattneub$ rdoc --version
rdoc 2.1.0
Big-iMac-Attack:~ mattneub$ ri --version
ri 2.1.0
Big-iMac-Attack:~ mattneub$ ri File#read
Nothing known about File#read

So it sounds like I do need to regenerate the ri data. How? Thx - m.

On Jul 29, 2008, at 15:04 , matt neuburg wrote:

rdoc 2.1.0
Big-iMac-Attack:~ mattneub$ ri --version
ri 2.1.0
Big-iMac-Attack:~ mattneub$ ri File#read
Nothing known about File#read

So it sounds like I do need to regenerate the ri data. How? Thx - m.

% sudo make install-doc

in the source tarball (assumes you installed your own ruby–if you
didn’t, you deleted your rdoc data?)

Ryan D. [email protected] wrote:

in the source tarball (assumes you installed your own ruby–if you
didn’t, you deleted your rdoc data?)

Didn’t help, presumably because the rdoc being used is the one in the
tarball, not the new version…?

m.

On Jul 29, 2008, at 20:24 , matt neuburg wrote:

Didn’t help, presumably because the rdoc being used is the one in the
tarball, not the new version…?

nope. same data. you’ve got something else going on.

On Wed, Jul 30, 2008 at 6:04 AM, matt neuburg [email protected] wrote:

So it sounds like I do need to regenerate the ri data. How? Thx - m.

on your ruby source directory, try running

rdoc --all --ri

hth.
kind regards -botp

On Jul 30, 2008, at 13:59 , matt neuburg wrote:

This rebuilt my documentation just fine. But

ri File#read

still gets a “nothing known” response.

So, I’m using rdoc 2.1.0, I’ve regenerated the docmentation, but I’m
still not seeing this new feature working. Do other people see it
working? If so, what might be the problem here?

works for me:

% ri File::read
--------------------------------------------------------------- IO::read
IO.read(name, [length [, offset]] ) => string

  Opens the file, optionally seeks to the given offset, then returns
  _length_ bytes (defaulting to the rest of the file). +read+

ensures
the file is closed before returning.

     IO.read("testfile")           #=> "This is line one\nThis is

line two\nT
his is line three\nAnd so on…\n"
IO.read(“testfile”, 20) #=> “This is line one\nThi”
IO.read(“testfile”, 20, 10) #=> "ne one\nThis is line "

On Jul 30, 2008, at 00:22 AM, Ryan D. wrote:

On Jul 29, 2008, at 20:24 , matt neuburg wrote:

Didn’t help, presumably because the rdoc being used is the one in the
tarball, not the new version…?

nope. same data. you’ve got something else going on.

RDoc 2.1.0 won’t generate RDoc from 1.8 due to a bug introduced before
2.0 to handle C prototypes. I’ll release a 2.1.1 tonight or tomorrow
and include proper instructions on how to do this.

botp [email protected] wrote:

On Wed, Jul 30, 2008 at 6:04 AM, matt neuburg [email protected] wrote:

So it sounds like I do need to regenerate the ri data. How? Thx - m.

on your ruby source directory, try running

rdoc --all --ri

Actually what I did was to blow away /usr/local/share/ri/1.8/system and
then

sudo rdoc --all --ri-system

This rebuilt my documentation just fine. But

ri File#read

still gets a “nothing known” response.

So, I’m using rdoc 2.1.0, I’ve regenerated the docmentation, but I’m
still not seeing this new feature working. Do other people see it
working? If so, what might be the problem here?

m.