Possible Duplicate:
How to run ruby files?
I am starting to learn Ruby and having a hard time running the Ruby classes in the Terminal.
I created a class in the Sublime Text editor, just “hello world”. I can compile using ruby hello.rb,
but how do I execute it?
I went to the terminal in my root directory and typed rails c which gave me a console. Could some one please tell me how to create an instance? Which console do I use?
Ruby is interpreted, so you don’t need to worry about a separate compile step.
ruby hello.rbis the execution command.The standard interactive shell (REPL) is
irb.