Sunday, 18 August 2013

Console not ready ruby sublime text file

Console not ready ruby sublime text file

I'm new to programming. Just about to start learning Ruby. I already took
a console class, but I am stuck here.
I'm using a mac 10.6.8. I have done a quick 1+2 in the sublime text
editor. I saved it. I went over to my console typed irb and then typed
ruby example.rb. I have read elsewhere here that typing require
'./example' would help....it didn't. I am getting the following
NameError: undefined local variable or method `example' for main:Object
from (irb):2
from /usr/local/rvm/rubies/ruby-1.9.3-p392/bin/irb:16:in `<main>'
I don't understand what I am doing wrong. Thank you for your help. I
really appreciate it.
-L

No comments:

Post a Comment