ri

P

Peter Seebach

So, I loaded Ruby on a NetBSD box, using whatever the defaults are
for NetBSD's pkgsrc system.

I have 'ri', but it doesn't know about any of the standard library
classes or built-ins. So, "ri Array" says it's never heard of it,
same with "ri CGI". Addons (gems, for instance) all show up fine.

Before I go a-debugging: Is this normal?

-s
 
P

Peña, Botp

From: (e-mail address removed) [mailto:[email protected]]=20
# I have 'ri', but it doesn't know about any of the standard library
# classes or built-ins. So, "ri Array" says it's never heard of it,
# same with "ri CGI". =20

it should.

root@pc4all:~# qri Array
----------------------------------------------------------- Class: Array
Arrays are ordered, integer-indexed collections of any object.
Array indexing starts at 0, as in C or Java. A negative index is
assumed to be relative to the end of the array---that is, an index
of -1 indicates the last element of the array, -2 is the next to
last element in the array, and so on.

------------------------------------------------------------------------

Includes:
Enumerable(all?, any?, collect, detect, each_cons, each_slice,
each_with_index, entries, enum_cons, enum_slice, enum_with_index,
find, find_all, grep, include?, inject, map, max, member?, min,
partition, reject, select, sort, sort_by, to_a, to_set, zip)
[snip]


works here on my linux and windows boxes.
kind regards -botp
 
J

John Joyce

From: (e-mail address removed) [mailto:[email protected]]
# I have 'ri', but it doesn't know about any of the standard library
# classes or built-ins. So, "ri Array" says it's never heard of it,
# same with "ri CGI".

it should.

root@pc4all:~# qri Array
----------------------------------------------------------- Class: =20
Array
Arrays are ordered, integer-indexed collections of any object.
Array indexing starts at 0, as in C or Java. A negative index is
assumed to be relative to the end of the array---that is, an =20
index
of -1 indicates the last element of the array, -2 is the next to
last element in the array, and so on.

----------------------------------------------------------------------=20=
--

Includes:
Enumerable(all?, any?, collect, detect, each_cons, each_slice,
each_with_index, entries, enum_cons, enum_slice, enum_with_index,
find, find_all, grep, include?, inject, map, max, member?, min,
partition, reject, select, sort, sort_by, to_a, to_set, zip)
[snip]


works here on my linux and windows boxes.
kind regards -botp
Does ri know the path to your docs ?

ri looks in a few places by default: the system's docs, the site docs =20=

(in an ri directory) and user docs (in a hidden dot dir in user's =20
home dir).

Mine look like this on OS X :
/usr/local/share/ri/1.8/site
/usr/local/share/ri/1.8/system

I could have (local only to my home dir) but don't have :
~/.rdoc/

To find your data directory:
ruby -r rbconfig -e 'p Config::CONFIG["datadir"]'

Mine is :
/usr/local/share/

This is the same location as my system's man pages.

You may have to add docs to ri yourself. (it seems...)
you need to run rdoc

One file at a time:

rdoc --ri filename.rb filename2.rb

Ruby's standard library and built in classes and modules:

rdoc --ri-system

(need to be in the Ruby source code directory, probably: /lib
maybe /lib/ruby )=
 

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,774
Messages
2,569,598
Members
45,151
Latest member
JaclynMarl
Top