Ri and rdoc....like perldoc?

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]

···

--
Posted via http://www.ruby-forum.com/.

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.

···

On Wed, Jul 7, 2010 at 10:10 PM, Derek Smith <derekbellnersmith@yahoo.com> 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.

Xavier Noria wrote:

···

On Wed, Jul 7, 2010 at 10:10 PM, Derek Smith > <derekbellnersmith@yahoo.com> 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?
--
Posted via http://www.ruby-forum.com/\.

Xavier Noria wrote:

On Wed, Jul 7, 2010 at 10:10 PM, Derek Smith

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

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

···

--
Posted via http://www.ruby-forum.com/\.

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 http://www.ruby-lang.org/en/documentation/\.

···

On Thu, Jul 8, 2010 at 7:40 PM, Derek Smith <derekbellnersmith@yahoo.com> wrote:

Xavier Noria wrote:

···

On Thu, Jul 8, 2010 at 7:40 PM, Derek Smith > <derekbellnersmith@yahoo.com> 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 http://www.ruby-lang.org/en/documentation/\.

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

peace.
--
Posted via http://www.ruby-forum.com/\.

Xavier Noria 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 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/

···

--
Posted via http://www.ruby-forum.com/\.

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.

···

On Jul 8, 2010, at 12:29 , Brian Candler wrote:

Xavier Noria 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 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/