# Getting ri working on FreeBSD

**URL:** <https://www.ruby-forum.com/t/getting-ri-working-on-freebsd/106663>\
**Category:** Ruby\
**Created:** [June 13, 2007, 1:13am UTC](https://www.ruby-forum.com/t/getting-ri-working-on-freebsd/106663 "2007-06-13T01:13:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpeterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58f4c7/32.png) [@cpeterson](https://www.ruby-forum.com/u/cpeterson)\
**Post date:** [June 13, 2007, 1:13am UTC](https://www.ruby-forum.com/t/getting-ri-working-on-freebsd/106663/1 "2007-06-13T01:13:52Z")

</div>

I seem to have run into a small problem on FreeBSD. Hopefully, someone  
here has an answer. (Note: cross-posted to freebsd-questions list)

No matter what I try to look up with ri (the Ruby information utility  
that is used to look up stuff about classes, methods, et cetera, from  
the  
command line), it returns the same result:

> ri Time.strftime  
> Nothing known about Time.strftime

I don’t see anything in /usr/ports/lang that seems to relate to the  
matter of ensuring ri has a database of information to share. What  
am I missing? How can I get ri working properly on FreeBSD?

---

<div class="post-metadata">

**Author:** ![cpeterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58f4c7/32.png) [@cpeterson](https://www.ruby-forum.com/u/cpeterson)\
**Post date:** [June 13, 2007, 10:05am UTC](https://www.ruby-forum.com/t/getting-ri-working-on-freebsd/106663/2 "2007-06-13T10:05:19Z")

</div>

On Wed, Jun 13, 2007 at 08:12:27AM +0900, Chad P. wrote:

> I don’t see anything in /usr/ports/lang that seems to relate to the  
> matter of ensuring ri has a database of information to share. What  
> am I missing? How can I get ri working properly on FreeBSD?

I managed to get it working. Apparently, I had to run:

# tar jxvf /usr/ports/distfiles/ruby/ruby-1.8.6.tar.bz2

# rdoc --ri -R -U ruby-1.8.6/

. . . but there didn’t appear to be any documentation for that in any  
easily discoverable location.

---

<div class="post-metadata">

**Author:** ![cpeterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58f4c7/32.png) [@cpeterson](https://www.ruby-forum.com/u/cpeterson)\
**Post date:** [June 13, 2007, 5:07pm UTC](https://www.ruby-forum.com/t/getting-ri-working-on-freebsd/106663/3 "2007-06-13T17:07:31Z")

</div>

On Jun 13, 12:04 am, Chad P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> –  
> CCD CopyWrite Chad P. [[http://ccd.apotheon.org](http://ccd.apotheon.org)]  
> Leon Festinger: “A man with a conviction is a hard man to change. Tell him  
> you disagree and he turns away. Show him facts and figures and he questions  
> your sources. Appeal to logic and he fails to see your point.”

Chad,

Where did you end up finding information about that…especially the -  
U switch.

Mike B.

---

<div class="post-metadata">

**Author:** ![cpeterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58f4c7/32.png) [@cpeterson](https://www.ruby-forum.com/u/cpeterson)\
**Post date:** [June 13, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/getting-ri-working-on-freebsd/106663/4 "2007-06-13T23:08:22Z")

</div>

barjunk wrote:

> On Jun 13, 12:04 am, Chad P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > –  
> > CCD CopyWrite Chad P. [[http://ccd.apotheon.org](http://ccd.apotheon.org)]  
> > Leon Festinger: “A man with a conviction is a hard man to change. Tell him  
> > you disagree and he turns away. Show him facts and figures and he questions  
> > your sources. Appeal to logic and he fails to see your point.”
> 
> Chad,
> 
> Where did you end up finding information about that…especially the -  
> U switch.
> 
> Mike B.

You can run rdoc -h for a list of the commands.

I think you may want to use -Y instead of -R because you are building  
the documentation for the standard classes.

# rdoc --ri -Y -U ruby-1.8.6

I’ve just started using FreeBSD (6.2) as of a week ago, but I would  
think the port should do this automatically? I looked at the  
/usr/ports/lang/ruby18 and it seems to have an option to build/install  
the documentation. There is also /usr/ports/lang/ruby-doc-stdlib, but I  
didn’t try building it.

---

<div class="post-metadata">

**Author:** ![cpeterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58f4c7/32.png) [@cpeterson](https://www.ruby-forum.com/u/cpeterson)\
**Post date:** [June 13, 2007, 11:18pm UTC](https://www.ruby-forum.com/t/getting-ri-working-on-freebsd/106663/5 "2007-06-13T23:18:40Z")

</div>

On Thu, Jun 14, 2007 at 06:08:30AM +0900, Ryan Zezeski wrote:

> > 
> 
> the documentation for the standard classes.  
> I wish I’d known that before I ran the command with -R.

> # rdoc --ri -Y -U ruby-1.8.6
> 
> I’ve just started using FreeBSD (6.2) as of a week ago, but I would  
> think the port should do this automatically? I looked at the  
> /usr/ports/lang/ruby18 and it seems to have an option to build/install  
> the documentation. There is also /usr/ports/lang/ruby-doc-stdlib, but I  
> didn’t try building it.

I don’t recall that being an option at the time I installed Ruby. C’est  
la vie.

---

<div class="post-metadata">

**Author:** ![cpeterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58f4c7/32.png) [@cpeterson](https://www.ruby-forum.com/u/cpeterson)\
**Post date:** [June 13, 2007, 11:02pm UTC](https://www.ruby-forum.com/t/getting-ri-working-on-freebsd/106663/6 "2007-06-13T23:02:36Z")

</div>

On Thu, Jun 14, 2007 at 12:05:05AM +0900, barjunk wrote:

> > > Nothing known about Time.strftime  
> > > easily discoverable location.
> 
> Where did you end up finding information about that…especially the -  
> U switch.

Enter “rdoc --help” or “rdoc -h” at the command line to get information  
about the CLI arguments available for rdoc.

It was actually someone else on the freebsd-questions mailing list that  
pointed me in the right direction, through a series of hunches.  
Attempting to run “ri -c” (something I had not yet tried) gave a faint  
hint, which led to another faint hint, and from there we found our way  
to  
the rdoc help to sort out what to do to build the ri database. It was  
kind of like a very brief, and interesting, scavenger hunt – which can  
be fun, but isn’t really the best way to document a fundamentally  
necessary feature.

At this point, I’m not sure whether the problem is a FreeBSD issue or a  
Ruby packaging issue, so I haven’t decided to make any bug reports or  
anything like that (since I don’t know yet where to send them, not  
knowing who’s responsible for this bug).

---

<div class="post-metadata">

**Author:** ![cpeterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58f4c7/32.png) [@cpeterson](https://www.ruby-forum.com/u/cpeterson)\
**Post date:** [June 19, 2007, 12:51am UTC](https://www.ruby-forum.com/t/getting-ri-working-on-freebsd/106663/7 "2007-06-19T00:51:03Z")

</div>

On Jun 13, 1:17 pm, Chad P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > Chad,
> 
> > didn’t try building it.
> 
> I don’t recall that being an option at the time I installed Ruby. C’est  
> la vie.
> 
> –  
> CCD CopyWrite Chad P. [[http://ccd.apotheon.org](http://ccd.apotheon.org)]  
> [Amazon.com](http://Amazon.com) interview candidate: “When C++ is your hammer, everything starts  
> to look like your thumb.”

Interestingly:

rdoc --ri -Y -U ruby-1.8.6

gives me:

invalid option – U

For help on options, try ‘rdoc --help’

I’m using RDoc V1.0.1 - 20041108, which i think comes with ruby 1.8.4.

Mike B.

---

<div class="post-metadata">

**Author:** ![cpeterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58f4c7/32.png) [@cpeterson](https://www.ruby-forum.com/u/cpeterson)\
**Post date:** [June 17, 2007, 2:47am UTC](https://www.ruby-forum.com/t/getting-ri-working-on-freebsd/106663/8 "2007-06-17T02:47:15Z")

</div>

On Jun 12, 2007, at 16:12, Chad P. wrote:

> Nothing known about Time.strftime
> 
> I don’t see anything in /usr/ports/lang that seems to relate to the  
> matter of ensuring ri has a database of information to share. What  
> am I missing? How can I get ri working properly on FreeBSD?

cd /usr/ports/lang/ruby  
WITH\_RDOC=yes make install
