# How regenerate ri data?

**URL:** <https://www.ruby-forum.com/t/how-regenerate-ri-data/144476>\
**Category:** Ruby\
**Created:** [July 30, 2008, 12:05am UTC](https://www.ruby-forum.com/t/how-regenerate-ri-data/144476 "2008-07-30T00:05:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt\_neuburg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@matt\_neuburg](https://www.ruby-forum.com/u/matt_neuburg)\
**Post date:** [July 30, 2008, 12:05am UTC](https://www.ruby-forum.com/t/how-regenerate-ri-data/144476/1 "2008-07-30T00:05:37Z")

</div>

[http://rubyforge.org/forum/forum.php?forum\_id=25981:](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.

---

<div class="post-metadata">

**Author:** ![matt\_neuburg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@matt\_neuburg](https://www.ruby-forum.com/u/matt_neuburg)\
**Post date:** [July 30, 2008, 1:24am UTC](https://www.ruby-forum.com/t/how-regenerate-ri-data/144476/2 "2008-07-30T01:24:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![matt\_neuburg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@matt\_neuburg](https://www.ruby-forum.com/u/matt_neuburg)\
**Post date:** [July 30, 2008, 5:25am UTC](https://www.ruby-forum.com/t/how-regenerate-ri-data/144476/3 "2008-07-30T05:25:32Z")

</div>

Ryan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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.

---

<div class="post-metadata">

**Author:** ![matt\_neuburg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@matt\_neuburg](https://www.ruby-forum.com/u/matt_neuburg)\
**Post date:** [July 30, 2008, 9:23am UTC](https://www.ruby-forum.com/t/how-regenerate-ri-data/144476/4 "2008-07-30T09:23:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![matt\_neuburg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@matt\_neuburg](https://www.ruby-forum.com/u/matt_neuburg)\
**Post date:** [July 30, 2008, 9:49am UTC](https://www.ruby-forum.com/t/how-regenerate-ri-data/144476/5 "2008-07-30T09:49:59Z")

</div>

On Wed, Jul 30, 2008 at 6:04 AM, matt neuburg [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![matt\_neuburg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@matt\_neuburg](https://www.ruby-forum.com/u/matt_neuburg)\
**Post date:** [July 31, 2008, 1:16am UTC](https://www.ruby-forum.com/t/how-regenerate-ri-data/144476/6 "2008-07-31T01:16:07Z")

</div>

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 "

---

<div class="post-metadata">

**Author:** ![matt\_neuburg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@matt\_neuburg](https://www.ruby-forum.com/u/matt_neuburg)\
**Post date:** [July 31, 2008, 2:10am UTC](https://www.ruby-forum.com/t/how-regenerate-ri-data/144476/7 "2008-07-31T02:10:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![matt\_neuburg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@matt\_neuburg](https://www.ruby-forum.com/u/matt_neuburg)\
**Post date:** [July 30, 2008, 11:01pm UTC](https://www.ruby-forum.com/t/how-regenerate-ri-data/144476/8 "2008-07-30T23:01:01Z")

</div>

botp [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Wed, Jul 30, 2008 at 6:04 AM, matt neuburg [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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.
