From: "Ghelani, Vidhi" Date: 2005-02-12T04:56:04+09:00 Subject: Re: problem using IRB Hey, I could download it and also use IRB. However, I was wondering if you could tell me how to run this code on IRB: def fact(n) if n == 0 1 else n * fact(n-1) end end print fact(ARGV[0].to_i), "\n" I tried doing it but its running each line separately. Is there any way to run the whole thing at once. Thanks, Vidhi -----Original Message----- From: Curt Hibbs [mailto:curt@hibbs.com] Sent: Friday, February 11, 2005 11:15 AM To: ruby-talk ML Subject: Re: new to this language Ghelani, Vidhi wrote: > > Hey curt, > > No I did'nt install this using the one-click installer. Truly > speaking I don't know how I got this. Neways, I tried 2 things > 1) Tried using irb from the secure shell that I am using. I just > typed irb, and it says -bash: -irm: command not found > 2) Since I have a windows machine, I tried using the command > prompt window and from there I typed in irb. Hmm...but this Does > not work either ! > > How do I go about getting irb, cos it sounds really kewl. Go here: http://rubyinstaller.rubyforge.org/ and follow the download link. Download the latest version of the installer (182-14). Once you have installed ruby from you should find a number of use tools in you start menu under "Ruby", and you should be able to run "irb" from the command line to get into an interactive ruby session. Curt