[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

newbie question about Ri

Grehom

6/8/2007 9:39:00 AM

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?

12 Answers

Dan Zwell

6/8/2007 9:49:00 AM

0

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

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.

Grehom

6/8/2007 9:56:00 AM

0

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.

Larry Hannay

6/11/2007 11:27:00 AM

0

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.

Sammy Larbi

6/11/2007 1:09:00 PM

0

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?

dblack

6/11/2007 1:29:00 PM

0

Jano Svitok

6/11/2007 3:25:00 PM

0

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.

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.

Jano Svitok

6/11/2007 4:02:00 PM

0

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

I have filed patch that fixes the issue:

http://rubyforge.org/tracker/index.php?func=detail&aid=11504&group_id=426&...

J.

James Britt

6/11/2007 4:49:00 PM

0

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://rub...


--
James Britt

"A principle or axiom is of no value without the rules for applying it."
- Len Bullard

Gavin Kistner

6/11/2007 6:36:00 PM

0

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://rub...

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

Jano Svitok

6/11/2007 6:55:00 PM

0

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://rub...
>
> ...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.