[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

how regenerate ri data?

matt

7/29/2008 10:00:00 PM

http://rubyforge.org/forum/forum.php?foru...:

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


--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...
7 Answers

Ryan Davis

7/29/2008 11:23:00 PM

0


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

> http://rubyforge.org/forum/forum.php?foru...:
>
>> * 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.

% sudo make install-doc

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


matt

7/30/2008 3:19:00 AM

0

Ryan Davis <ryand-ruby@zenspider.com> wrote:

> On Jul 29, 2008, at 15:04 , matt neuburg wrote:
>
> > http://rubyforge.org/forum/forum.php?foru...:
> >
> >> * 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.
>
> % 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.
--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...

Ryan Davis

7/30/2008 7:22:00 AM

0


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.

botp

7/30/2008 7:49:00 AM

0

On Wed, Jul 30, 2008 at 6:04 AM, matt neuburg <matt@tidbits.com> 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

matt

7/30/2008 8:58:00 PM

0

botp <botpena@gmail.com> wrote:

> On Wed, Jul 30, 2008 at 6:04 AM, matt neuburg <matt@tidbits.com> 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.
--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...

Ryan Davis

7/30/2008 11:15:00 PM

0


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 "


Eric Hodel

7/31/2008 12:09:00 AM

0

On Jul 30, 2008, at 00:22 AM, Ryan Davis 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.