# Ri and rdoc....like perldoc?

**URL:** <https://www.ruby-forum.com/t/ri-and-rdoc-like-perldoc/191234>\
**Category:** Ruby\
**Created:** [July 7, 2010, 10:10pm UTC](https://www.ruby-forum.com/t/ri-and-rdoc-like-perldoc/191234 "2010-07-07T22:10:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bloodniece](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/47e85d/32.png) [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Post date:** [July 7, 2010, 10:10pm UTC](https://www.ruby-forum.com/t/ri-and-rdoc-like-perldoc/191234/1 "2010-07-07T22:10:49Z")

</div>

Hi All,

Will anyone kindly help? I want to get my ruby docs fully functional,  
meaning I can view any type of help on methods, keywords, etc.  
As in Perl I can type perldoc perlop or perldoc -f chomp. The latter  
give me a whole page dedicated to perl operators and the former gives me  
one page on what is chomp and how to use it.

thank u!

See below for my current config:

# ruby -v

ruby 1.8.7 (2009-04-08 patchlevel 160) [hppa2.0w-hpux11.23]

# gem list --l

\*\*\* LOCAL GEMS \*\*\*

actionmailer (2.3.4, 2.3.2)  
actionpack (2.3.4, 2.3.2)  
activerecord (2.3.4, 2.3.2)  
activeresource (2.3.4, 2.3.2)  
activesupport (2.3.4, 2.3.2)  
archive-tar-minitar (0.5.2)  
Ascii85 (1.0.0)  
columnize (0.3.1)  
pdf-reader (0.7.7)  
rack (1.0.0)  
rails (2.3.4, 2.3.2)  
rake (0.8.7, 0.8.5)  
rdoc (2.5.8)  
rdoc-data (2.5.3)  
ruby\_core\_source (0.1.4)  
rubygems-update (1.3.7)  
rubyntlm (0.1.1)

root@xxxx [/root/.rdoc]

# ll -R

total 0  
drwxr-xr-x 2 root sys 96 Jul 7 11:33 doc

./doc:  
total 0  
root@xxxx [/root/.rdoc]

---

<div class="post-metadata">

**Author:** ![bloodniece](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/47e85d/32.png) [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Post date:** [July 7, 2010, 11:47pm UTC](https://www.ruby-forum.com/t/ri-and-rdoc-like-perldoc/191234/2 "2010-07-07T23:47:25Z")

</div>

On Wed, Jul 7, 2010 at 10:10 PM, Derek S.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Will anyone kindly help? Â I want to get my ruby docs fully functional,  
> meaning I can view any type of help on methods, keywords, etc.  
> As in Perl I can type perldoc perlop or perldoc -f chomp. Â The latter  
> give me a whole page dedicated to perl operators and the former gives me  
> one page on what is chomp and how to use it.

Unfortunately documentation is not one of Ruby strengths, there’s  
nothing as comprehensive as Perl builtin documentation (though there  
are few languages that can compare with Perl documentation). Generally  
speaking, libraries are not as well-documented as Perl modules either.

If anyone is surprised by the previous paragraph just type

```
perldoc perl

```

in a shell.

If you want to learn about the Ruby language you normally get a book,  
as reference I personally use Flanagan & Matsumoto. There are some  
free tutorials online, there’s also an old version of the Pickaxe.

---

<div class="post-metadata">

**Author:** ![bloodniece](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/47e85d/32.png) [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Post date:** [July 8, 2010, 7:40pm UTC](https://www.ruby-forum.com/t/ri-and-rdoc-like-perldoc/191234/3 "2010-07-08T19:40:21Z")

</div>

Xavier N. wrote:

> On Wed, Jul 7, 2010 at 10:10 PM, Derek S.  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Will anyone kindly help? Â I want to get my ruby docs fully functional,  
> > meaning I can view any type of help on methods, keywords, etc.  
> > As in Perl I can type perldoc perlop or perldoc -f chomp. Â The latter  
> > give me a whole page dedicated to perl operators and the former gives me  
> > one page on what is chomp and how to use it.
> 
> Unfortunately documentation is not one of Ruby strengths, there’s  
> nothing as comprehensive as Perl builtin documentation (though there  
> are few languages that can compare with Perl documentation). Generally  
> speaking, libraries are not as well-documented as Perl modules either.

thats unfortunate, will this likely change in the future?  
so if I want to look up how to use a function, how do i do this using  
ruby?

---

<div class="post-metadata">

**Author:** ![bloodniece](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/47e85d/32.png) [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Post date:** [July 8, 2010, 7:56pm UTC](https://www.ruby-forum.com/t/ri-and-rdoc-like-perldoc/191234/4 "2010-07-08T19:56:50Z")

</div>

On Thu, Jul 8, 2010 at 7:40 PM, Derek S.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> thats unfortunate, will this likely change in the future?

I don’t know, everything is Open Source, if Perl could so does Ruby,  
it all depends on the community. And Perl has no “documentation team”,  
mind you, everything happens in the -porters ML.

> so if I want to look up how to use a function, how do i do this using  
> ruby?

In the command line you check it with ri. Online you check some of the  
references listed in [Documentation](http://www.ruby-lang.org/en/documentation/).

---

<div class="post-metadata">

**Author:** ![bloodniece](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/47e85d/32.png) [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Post date:** [July 8, 2010, 8:26pm UTC](https://www.ruby-forum.com/t/ri-and-rdoc-like-perldoc/191234/5 "2010-07-08T20:26:15Z")

</div>

Xavier N. wrote:

> On Thu, Jul 8, 2010 at 7:40 PM, Derek S.  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > thats unfortunate, will this likely change in the future?
> 
> I don’t know, everything is Open Source, if Perl could so does Ruby,  
> it all depends on the community. And Perl has no “documentation team”,  
> mind you, everything happens in the -porters ML.
> 
> > so if I want to look up how to use a function, how do i do this using  
> > ruby?
> 
> In the command line you check it with ri. Online you check some of the  
> references listed in [Documentation](http://www.ruby-lang.org/en/documentation/).

ok thank you! I prefer Ruby, it neater and more quaint!

peace.

---

<div class="post-metadata">

**Author:** ![bloodniece](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/47e85d/32.png) [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Post date:** [July 8, 2010, 10:27pm UTC](https://www.ruby-forum.com/t/ri-and-rdoc-like-perldoc/191234/6 "2010-07-08T22:27:19Z")

</div>

On Jul 8, 2010, at 12:29 , Brian C. wrote:

> then point your web browser at [http://127.0.0.1:8808/](http://127.0.0.1:8808/)

That’s not strictly necessary. ri picks up gem rdoc too.

Do make sure you have the rdoc gem installed so you have the latest  
version of ri and rdoc.

---

<div class="post-metadata">

**Author:** ![bloodniece](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/47e85d/32.png) [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Post date:** [July 9, 2010, 5:56pm UTC](https://www.ruby-forum.com/t/ri-and-rdoc-like-perldoc/191234/7 "2010-07-09T17:56:54Z")

</div>

Xavier N. wrote:

> On Wed, Jul 7, 2010 at 10:10 PM, Derek S.

> Unfortunately documentation is not one of Ruby strengths, there’s  
> nothing as comprehensive as Perl builtin documentation (though there  
> are few languages that can compare with Perl documentation). Generally  
> speaking, libraries are not as well-documented as Perl modules either.

True. I’ve been trying to help it by fleshing out the ruby wikibook:

[http://en.wikibooks.org/wiki/Ruby\_Programming](http://en.wikibooks.org/wiki/Ruby_Programming)

> If you want to learn about the Ruby language you normally get a book,  
> as reference I personally use Flanagan & Matsumoto. There are some  
> free tutorials online, there’s also an old version of the Pickaxe.

Here’s a list of some online books:  
[http://en.wikibooks.org/wiki/Ruby\_Programming#Online](http://en.wikibooks.org/wiki/Ruby_Programming#Online)

---

<div class="post-metadata">

**Author:** ![bloodniece](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/47e85d/32.png) [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Post date:** [July 8, 2010, 9:29pm UTC](https://www.ruby-forum.com/t/ri-and-rdoc-like-perldoc/191234/8 "2010-07-08T21:29:42Z")

</div>

Xavier N. wrote:

> > so if I want to look up how to use a function, how do i do this using  
> > ruby?
> 
> In the command line you check it with ri. Online you check some of the  
> references listed in [Documentation](http://www.ruby-lang.org/en/documentation/).

And for installed gems, type

gem server --daemon

then point your web browser at [http://127.0.0.1:8808/](http://127.0.0.1:8808/)
