# Newbie question about Ri

**URL:** <https://rubytalk.org/t/newbie-question-about-ri/38199>\
**Category:** ruby-talk\
**Created:** [8 June 2007 09:40 UTC](https://rubytalk.org/t/newbie-question-about-ri/38199 "2007-06-08T09:40:18Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Graham\_Smith1](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@Graham\_Smith1](https://rubytalk.org/u/Graham_Smith1)\
**Post date:** [8 June 2007 09:40 UTC](https://rubytalk.org/t/newbie-question-about-ri/38199/1 "2007-06-08T09:40:18Z")

</div>

I just installed the latest Windows version from Activestate (having  
completely removed earlier version) ruby186-25.exe and that is working  
fine:  
&nbsp;&nbsp;&nbsp;&nbsp;C:\ruby\bin\>ruby -v  
&nbsp;&nbsp;&nbsp;&nbsp;ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]

however when I came to work through tutorials I found Ri wasn't  
working quite as I expected:

C:\ruby\bin\>ri String#tr

> **···**
>
> --------------------------------------------------------------  
> String#tr  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tr(from, to)  
> -------------------------------------------------------------  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(no description...)
> 
> according to the tutorial I should get a lot more info about  
> parameters, example of usage etc. from last time I played with this I  
> thought it was more informative, have I missed an important step in  
> the installation?

---

<div class="post-metadata">

**Author:** ![Dan\_Zwell](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@Dan\_Zwell](https://rubytalk.org/u/Dan_Zwell)\
**Post date:** [8 June 2007 09:49 UTC](https://rubytalk.org/t/newbie-question-about-ri/38199/2 "2007-06-08T09:49:10Z")

</div>

Grehom wrote:

> I just installed the latest Windows version from Activestate (having  
> completely removed earlier version) ruby186-25.exe and that is working  
> fine:  
> &nbsp;&nbsp;&nbsp;&nbsp;C:\ruby\bin\>ruby -v  
> &nbsp;&nbsp;&nbsp;&nbsp;ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
> 
> however when I came to work through tutorials I found Ri wasn't  
> working quite as I expected:
> 
> C:\ruby\bin\>ri String#tr  
> --------------------------------------------------------------  
> String#tr  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tr(from, to)  
> -------------------------------------------------------------  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(no description...)
> 
> according to the tutorial I should get a lot more info about  
> parameters, example of usage etc. from last time I played with this I  
> thought it was more informative, have I missed an important step in  
> the installation?

Nope, you did nothing wrong. At least, that's the same output I get (on Linux, having installed Ruby from a package manager). The fact that it even shows up means it's working. Otherwise it would say "Nothing known about String#tr". Other methods will have better documentation.

---

<div class="post-metadata">

**Author:** ![David\_A\_Black3](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@David\_A\_Black3](https://rubytalk.org/u/David_A_Black3)\
**Post date:** [11 June 2007 13:28 UTC](https://rubytalk.org/t/newbie-question-about-ri/38199/3 "2007-06-11T13:28:48Z")

</div>

Hi --

> **···**
>
> On Fri, 8 Jun 2007, Grehom wrote:
> 
> > I just installed the latest Windows version from Activestate (having  
> > completely removed earlier version) ruby186-25.exe and that is working  
> > fine:  
> > &nbsp;&nbsp;&nbsp;C:\ruby\bin\>ruby -v  
> > &nbsp;&nbsp;&nbsp;ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
> > 
> > however when I came to work through tutorials I found Ri wasn't  
> > working quite as I expected:
> > 
> > C:\ruby\bin\>ri String#tr  
> > --------------------------------------------------------------  
> > String#tr  
> > &nbsp;&nbsp;&nbsp;&nbsp;tr(from, to)  
> > -------------------------------------------------------------  
> > &nbsp;&nbsp;&nbsp;&nbsp;(no description...)
> > 
> > according to the tutorial I should get a lot more info about  
> > parameters, example of usage etc. from last time I played with this I  
> > thought it was more informative, have I missed an important step in  
> > the installation?
> 
> No; I'm seeing the same problem. For some reason tr isn't getting  
> picked up during rdoc/ri generation.
> 
> David
> 
> --  
> \* Books:  
> &nbsp;&nbsp;&nbsp;RAILS ROUTING (new! [http://safari.awprofessional.com/9780321509246\](http://safari.awprofessional.com/9780321509246%5C))  
> &nbsp;&nbsp;&nbsp;RUBY FOR RAILS ([http://www.manning.com/black\](http://www.manning.com/black%5C))  
> \* Ruby/Rails training  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& consulting: Ruby Power and Light, LLC ([http://www.rubypal.com](http://www.rubypal.com))

---

<div class="post-metadata">

**Author:** ![Graham\_Smith1](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@Graham\_Smith1](https://rubytalk.org/u/Graham_Smith1)\
**Post date:** [8 June 2007 10:00 UTC](https://rubytalk.org/t/newbie-question-about-ri/38199/4 "2007-06-08T10:00:18Z")

</div>

Thanks for quick response, I've found other functions seem to be  
working ok, for example ri String#unpack, produced what my Pickaxe  
book tells me about. But I did wonder where someone without the book  
would get documentation on that function.

---

<div class="post-metadata">

**Author:** ![Jan\_Svitok](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@Jan\_Svitok](https://rubytalk.org/u/Jan_Svitok)\
**Post date:** [11 June 2007 15:25 UTC](https://rubytalk.org/t/newbie-question-about-ri/38199/5 "2007-06-11T15:25:04Z")

</div>

The reason is that rdoc picks empty docs from lib/jcode.rb.  
Maybe we should add #:nodoc: to some of the methods in jcode.rb

J.

> **···**
>
> On 6/11/07, dblack@wobblini.net \<dblack@wobblini.net\> wrote:
> 
> > Hi --
> > 
> > On Fri, 8 Jun 2007, Grehom wrote:
> > 
> > \> I just installed the latest Windows version from Activestate (having  
> > \> completely removed earlier version) ruby186-25.exe and that is working  
> > \> fine:  
> > \> C:\ruby\bin\>ruby -v  
> > \> ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]  
> > \>  
> > \> however when I came to work through tutorials I found Ri wasn't  
> > \> working quite as I expected:  
> > \>  
> > \> C:\ruby\bin\>ri String#tr  
> > \> --------------------------------------------------------------  
> > \> String#tr  
> > \> tr(from, to)  
> > \> -------------------------------------------------------------  
> > \> (no description...)  
> > \>  
> > \> according to the tutorial I should get a lot more info about  
> > \> parameters, example of usage etc. from last time I played with this I  
> > \> thought it was more informative, have I missed an important step in  
> > \> the installation?
> > 
> > No; I'm seeing the same problem. For some reason tr isn't getting  
> > picked up during rdoc/ri generation.

---

<div class="post-metadata">

**Author:** ![Larry\_Hannay](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@Larry\_Hannay](https://rubytalk.org/u/Larry_Hannay)\
**Post date:** [11 June 2007 11:30 UTC](https://rubytalk.org/t/newbie-question-about-ri/38199/6 "2007-06-11T11:30:12Z")

</div>

Grehom wrote:

> Thanks for quick response, I've found other functions seem to be  
> working ok, for example ri String#unpack, produced what my Pickaxe  
> book tells me about. But I did wonder where someone without the book  
> would get documentation on that function.

I love Ruby. And Rails. But I've found the lack of documentation to be its weakest link. Big time. I'm a newbie and have asked other veterans about this - and they all agree.

---

<div class="post-metadata">

**Author:** ![Jan\_Svitok](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@Jan\_Svitok](https://rubytalk.org/u/Jan_Svitok)\
**Post date:** [11 June 2007 16:02 UTC](https://rubytalk.org/t/newbie-question-about-ri/38199/7 "2007-06-11T16:02:01Z")

</div>

I have filed patch that fixes the issue:

[http://rubyforge.org/tracker/index.php?func=detail&aid=11504&group\_id=426&atid=1700](http://rubyforge.org/tracker/index.php?func=detail&aid=11504&group_id=426&atid=1700)

J.

> **···**
>
> On 6/11/07, Jano Svitok \<jan.svitok@gmail.com\> wrote:
> 
> > The reason is that rdoc picks empty docs from lib/jcode.rb.  
> > Maybe we should add #:nodoc: to some of the methods in jcode.rb

---

<div class="post-metadata">

**Author:** ![James\_Britt3](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@James\_Britt3](https://rubytalk.org/u/James_Britt3)\
**Post date:** [11 June 2007 16:48 UTC](https://rubytalk.org/t/newbie-question-about-ri/38199/8 "2007-06-11T16:48:41Z")

</div>

Grehom wrote:

> Thanks for quick response, I've found other functions seem to be  
> working ok, for example ri String#unpack, produced what my Pickaxe  
> book tells me about. But I did wonder where someone without the book  
> would get documentation on that function.

> **[Ruby-Doc.org: Documenting the Ruby Language](https://ruby-doc.org/)**
>
> Fast, searchable Ruby documentation for core and standard libraries. Plus, links to tutorials, guides, books, and related sites.

> **···**
>
> --  
> James Britt
> 
> "A principle or axiom is of no value without the rules for applying it."  
> &nbsp;&nbsp;&nbsp;- Len Bullard

---

<div class="post-metadata">

**Author:** ![Sammy\_Larbi](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@Sammy\_Larbi](https://rubytalk.org/u/Sammy_Larbi)\
**Post date:** [11 June 2007 13:09 UTC](https://rubytalk.org/t/newbie-question-about-ri/38199/9 "2007-06-11T13:09:19Z")

</div>

Larry Hannay wrote, On 6/11/2007 6:30 AM:

> Grehom wrote:
> 
> > Thanks for quick response, I've found other functions seem to be  
> > working ok, for example ri String#unpack, produced what my Pickaxe  
> > book tells me about. But I did wonder where someone without the book  
> > would get documentation on that function.
> 
> I love Ruby. And Rails. But I've found the lack of documentation to be its weakest link. Big time. I'm a newbie and have asked other veterans about this - and they all agree.

What specifically have you found missing?

---

<div class="post-metadata">

**Author:** ![Gavin\_Kistner2](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@Gavin\_Kistner2](https://rubytalk.org/u/Gavin_Kistner2)\
**Post date:** [11 June 2007 18:40 UTC](https://rubytalk.org/t/newbie-question-about-ri/38199/10 "2007-06-11T18:40:16Z")

</div>

...except that in the OP's problem, ruby-doc gets its information from  
RDoc, and hence also has broken/missing information on String#tr

> **···**
>
> On Jun 11, 10:48 am, James Britt \<james.br...@gmail.com\> wrote:
> 
> > Grehom wrote:  
> > \> Thanks for quick response, I've found other functions seem to be  
> > \> working ok, for example ri String#unpack, produced what my Pickaxe  
> > \> book tells me about. But I did wonder where someone without the book  
> > \> would get documentation on that function.
> > 
> > [http://ruby-doc.org/](http://ruby-doc.org/)

---

<div class="post-metadata">

**Author:** ![Graham\_Smith1](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@Graham\_Smith1](https://rubytalk.org/u/Graham_Smith1)\
**Post date:** [15 June 2007 07:20 UTC](https://rubytalk.org/t/newbie-question-about-ri/38199/11 "2007-06-15T07:20:13Z")

</div>

That's great thanks, I know other beginners like me will appreciate it.

> **···**
>
> On 11 Jun, 16:02, "Jano Svitok" \<jan.svi...@gmail.com\> wrote:
> 
> > On 6/11/07, Jano Svitok \<jan.svi...@gmail.com\> wrote:
> > 
> > \> The reason is that rdoc picks empty docs from lib/jcode.rb.  
> > \> Maybe we should add #:nodoc: to some of the methods in jcode.rb
> > 
> > I have filed patch that fixes the issue:
> > 
> > [http://rubyforge.org/tracker/index.php?func=detail&aid=11504&group\_id\.\.\](http://rubyforge.org/tracker/index.php?func=detail&aid=11504&group_id%5C.%5C.%5C).
> > 
> > J.

---

<div class="post-metadata">

**Author:** ![Jan\_Svitok](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@Jan\_Svitok](https://rubytalk.org/u/Jan_Svitok)\
**Post date:** [11 June 2007 18:54 UTC](https://rubytalk.org/t/newbie-question-about-ri/38199/12 "2007-06-11T18:54:35Z")

</div>

Somehow ruby-doc.org has both definitions, empty tr and correct  
str.tr. RI picks the first.

> **···**
>
> On 6/11/07, Phrogz \<gavin@refinery.com\> wrote:
> 
> > On Jun 11, 10:48 am, James Britt \<james.br...@gmail.com\> wrote:  
> > \> Grehom wrote:  
> > \> \> Thanks for quick response, I've found other functions seem to be  
> > \> \> working ok, for example ri String#unpack, produced what my Pickaxe  
> > \> \> book tells me about. But I did wonder where someone without the book  
> > \> \> would get documentation on that function.  
> > \>  
> > \> [http://ruby-doc.org/](http://ruby-doc.org/)
> > 
> > ...except that in the OP's problem, ruby-doc gets its information from  
> > RDoc, and hence also has broken/missing information on String#tr

---

<div class="post-metadata">

**Author:** ![Gavin\_Kistner2](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@Gavin\_Kistner2](https://rubytalk.org/u/Gavin_Kistner2)\
**Post date:** [11 June 2007 19:05 UTC](https://rubytalk.org/t/newbie-question-about-ri/38199/13 "2007-06-11T19:05:07Z")

</div>

Oops, mea culpa. I saw the empty definition and missed the full one. 🙂

> **···**
>
> On Jun 11, 12:54 pm, "Jano Svitok" \<jan.svi...@gmail.com\> wrote:
> 
> > On 6/11/07, Phrogz \<g...@refinery.com\> wrote:  
> > \> ...except that in the OP's problem, ruby-doc gets its information from  
> > \> RDoc, and hence also has broken/missing information on String#tr
> > 
> > Somehow ruby-doc.org has both definitions, empty tr and correct  
> > str.tr. RI picks the first.
