how regenerate ri data?

M

matt neuburg

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.
 
R

Ryan Davis

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


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.

% sudo make install-doc

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

matt neuburg

Ryan Davis said:
% sudo make install-doc

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.
 
R

Ryan Davis

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.
 
M

matt neuburg

botp said:
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.
 
R

Ryan Davis

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

Eric Hodel

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.
 

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,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top