Modules / Documentation / CPAN like repository?

I am having a blast with ruby and the more I convert my Perl code to ruby ,
and then RE FACTOR... well its just so much better to read that I am blown
away.

I keep running into situations where I have some cpan module that i am using
in a perl script and before redesigning the wheel i do some google searches
for ruby equivalents.

I usually find one but its in some require statement in a script from some
mailing. More searching and I eventually find it. But then I can not find
any decent documentation on it(not that their isn't some just that I just
can't seem to get my head around how all the tools work. to find it)

For example. I need to be able to write excel spreadsheets on *nix boxes.
Find out that hey they have a port of spreadsheet::writeexcel. FANTASTIC so
now want. The documentation from RAA website is just a quick 4 line
synopsis. IS that it? Is the idea then to just do the mental guesses on how
it was ported and should work based on the perldocs for the original module?

What is the perldoc command for ruby?
I try rdoc for the command line and every time it finds nothing. I put the
same command in ri and again nothing.

Another example I need to do some recursive file searches. So I do a google
search ruby file find.

Second link is a link to a message from this list
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/38267 dig
through the script AHH require find must be the key.
rdoc find
File not found: find

ri find
gives a bunch of modules but no documentation and nothing that looks like
the module i am trying to use.

I am not even sure if its part of the standard distribution.

There seems to be tons of libraries out there which is how it should be with
a language so build on OO ideas and code reuse. But it just seems
disorganized and in a pinch at work i keep having to switch back to perl to
burn through a quick script.

Is it just my my ignorance or is there some cult of the hidden ruby modules.

I have asked about rdoc and ri on this list and I am not just trying to feed
the same info back because I am slow and un-observant but it just "feels"
like that has got to be an easier way to get to some of this stuff. How can
a language that just SCREAMS code reuse be so fractured. So I post again
hopefully not angering anyone.

Not trying to keep pointing to perl but its my only point of reference.
TIA,
PK

What is the perldoc command for ruby?

ri

Installing the docs isn't always automatic though. If you build from source, it's important to make install-all.

Also, many standard libraries are not documented.

Another example I need to do some recursive file searches. So I do a google
search ruby file find.

ri Find

Note the capital. It is a standard library.

Is it just my my ignorance or is there some cult of the hidden ruby modules.

It definitely takes some getting use to. The Pickaxe (2nd Edition) has an appendix that is very good for getting introductions to the standard libraries. It helps you know what's in there.

I certainly agree that things could be better though.

James Edward Gray II

···

On Jun 5, 2006, at 8:57 PM, Paul D. Kraus wrote:

Paul D. Kraus wrote:

What is the perldoc command for ruby?

Examples:

   ri String
   ri String.to_i

I try rdoc for the command line and every time it finds nothing. I put the
same command in ri and again nothing.

rdoc will crawl though your source code and generate documentation. It can also generate data files used by ri. But it does not serve back that information. ri does that.

Another example I need to do some recursive file searches. So I do a google
search ruby file find.

Try www.ruby-doc.org/core and RDoc Documentation

···

--
James Britt

"A principle or axiom is of no value without the rules for applying it."
   - Len Bullard