[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problem with ri or me?

Dave Miller

4/3/2007 5:14:00 AM

Hello --

I just installed Ruby a couple of days ago, and I have been going through
tutorials, etc. One thing I can't explain is that ri doesn't seem to work
on my system. I am running Ruby 1.8.6 on XP. I am trying to run ri through
irb 0.9.5. (Both things are what I got when I did the simple install a few
days ago.)

If I enter ri, I get something like "undefined method `ri' for main:Object
from (irb):4"

What am I doing wrong?

Thanks

Dave Miller


3 Answers

Chris Shea

4/3/2007 5:23:00 AM

0

On Apr 2, 11:14 pm, "Dave Miller" <dmil...@tecoloteNOSPAM.net> wrote:
> Hello --
>
> I just installed Ruby a couple of days ago, and I have been going through
> tutorials, etc. One thing I can't explain is that ri doesn't seem to work
> on my system. I am running Ruby 1.8.6 on XP. I am trying to run ri through
> irb 0.9.5. (Both things are what I got when I did the simple install a few
> days ago.)
>
> If I enter ri, I get something like "undefined method `ri' for main:Object
> from (irb):4"
>
> What am I doing wrong?
>
> Thanks
>
> Dave Miller

You run ri from the command line, not from within irb.

Welcome to Ruby.

Chris

John Joyce

4/3/2007 5:40:00 AM

0

ri is a command line tool.

I had the same confusion when I first got started!

In irb, you can type the object_name.methods
dot methods will give you a list of methods for the object.
This is a good thing to keep in mind. It's one example of why irb is
so useful. Rather than combing through documentation all the time,
you can ask the object directly!

Rich Morin

4/3/2007 4:58:00 PM

0

You might give this a try:

http://freshmeat.net/projec...

-r
--
http://www.cf... Rich Morin
http://www.cf.../resume rdm@cfcl.com
http://www.cf.../weblog +1 650-873-7841

Technical editing and writing, programming, and web development