From: Chad Perrin Date: 2007-06-14T06:00:16+09:00 Subject: Re: getting ri working on FreeBSD On Thu, Jun 14, 2007 at 12:05:05AM +0900, barjunk wrote: > On Jun 13, 12:04 am, Chad Perrin wrote: > > On Wed, Jun 13, 2007 at 08:12:27AM +0900, Chad Perrin wrote: > > > 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? > > > > 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. > > 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). -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] Amazon.com interview candidate: "When C++ is your hammer, everything starts to look like your thumb."