newbie question about Ri

G

Grehom

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

Dan Zwell

Grehom said:
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.
 
G

Grehom

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

Larry Hannay

Grehom said:
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.
 
S

Sammy Larbi

Larry Hannay wrote, On 6/11/2007 6:30 AM:
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?
 
D

dblack

Hi --

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.


David

--
* Books:
RAILS ROUTING (new! http://safari.awprofessional.com/9780321509246)
RUBY FOR RAILS (http://www.manning.com/black)
* Ruby/Rails training
& consulting: Ruby Power and Light, LLC (http://www.rubypal.com)
 
J

Jano Svitok

Hi --

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

James Britt

Grehom said:
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/
 
J

Jano Svitok

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

Phrogz

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

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

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,813
Messages
2,569,696
Members
45,483
Latest member
TedDvb6626

Latest Threads

Top