I am new to Ruby, new to scripting languages, but not quite new to programming. I have about a year of experience with Java, but this whole command line is just messing around with my head.
I follow this guide, just for this:
http://www.ruby-lang.org/en/documentation/quickstart/3/
and all this is simple and good, until they ask me to save the file and run it from IRB. I entered "ruby ri20min.rb" (without quotes, of course) in IRB. I get this error:
NameError: undefined local variable or 'ri20min' method for main: Object from (irb): 1
What am I doing wrong? The tutorial, apparently, implies that the file must be launched via IRB; but maybe he should have gone through the command line? Well, I tried it too, but he tells me:
'ruby' is not recognized as an internal or external command, a working program or batch file.
Thanks in advance for any help you can give! This 20-minute tutorial disappointed me for more than an hour of syntax adjustments and Internet searches.
source
share