ri and rdoc....like perldoc?

Discussion in 'Ruby' started by Derek Smith, Jul 7, 2010.

  1. Derek Smith

    Derek Smith Guest

    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/.
     
    Derek Smith, Jul 7, 2010
    #1
    1. Advertising

  2. Derek Smith

    Xavier Noria Guest

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

    > Will anyone kindly help? =C2=A0I want to get my ruby docs fully functiona=

    l,
    > meaning I can view any type of help on methods, keywords, etc.
    > As in Perl I can type perldoc perlop or perldoc -f chomp. =C2=A0The latte=

    r
    > 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.
     
    Xavier Noria, Jul 7, 2010
    #2
    1. Advertising

  3. Derek Smith

    Derek Smith Guest

    Xavier Noria wrote:
    > On Wed, Jul 7, 2010 at 10:10 PM, Derek Smith
    > <> 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/.
     
    Derek Smith, Jul 8, 2010
    #3
  4. Derek Smith

    Xavier Noria Guest

    On Thu, Jul 8, 2010 at 7:40 PM, Derek Smith <> 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/.
     
    Xavier Noria, Jul 8, 2010
    #4
  5. Derek Smith

    Derek Smith Guest

    Xavier Noria wrote:
    > On Thu, Jul 8, 2010 at 7:40 PM, Derek Smith
    > <> 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/.
     
    Derek Smith, Jul 8, 2010
    #5
  6. Brian Candler, Jul 8, 2010
    #6
  7. Derek Smith

    Ryan Davis Guest

    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?

    >>=20
    >> 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/.

    >=20
    > And for installed gems, type
    >=20
    > gem server --daemon
    >=20
    > then point your web browser at 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.
     
    Ryan Davis, Jul 8, 2010
    #7
  8. Derek Smith

    Roger Pack Guest

    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/.
     
    Roger Pack, Jul 9, 2010
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Schwarz
    Replies:
    6
    Views:
    283
    Randy W. Sims
    Jan 1, 2004
  2. Brian Schröder
    Replies:
    5
    Views:
    164
    Dave Thomas
    Sep 18, 2004
  3. Daniel Berger
    Replies:
    1
    Views:
    157
    Dave Thomas
    Nov 2, 2004
  4. Iwan van der Kleyn

    rdoc: how to add readme.rdoc as index.html?

    Iwan van der Kleyn, Apr 26, 2005, in forum: Ruby
    Replies:
    1
    Views:
    264
    Stefan Lang
    Apr 26, 2005
  5. Paul Van Delst

    How to use rdoc parsers outside of rdoc?

    Paul Van Delst, Jul 27, 2006, in forum: Ruby
    Replies:
    0
    Views:
    121
    Paul Van Delst
    Jul 27, 2006
Loading...

Share This Page