Basically, I am trying to learn Ruby. I have been following This tutorial, and I've ran into a problem with the very first step...
Basically, I can't get command window to do anything. It says to type the following into an editor and save it as p001hello.rb
# p001hello.rb puts 'Hello' p 'hello' print 'hello'
And I did. Then it tells me to type the top line into the command window, and the bottom should show. So I type in:
c:\rubyprograms> ruby p001hello.rb
and I get:
-1:1: syntax error, unexpected $undefined, expecting tSTRING_CONTENT or tSTRING_D
BEG or tSTRING_DVAR or tSTRING_END
C:\rubyprograms> ruby p001hello.rb
^
-:1: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '<'
C:\rubyprograms> ruby p001hello.rb
^
So... If anybody could shed some enlightenment on what I did wrong, I'd be very grateful. Ruby seems like a very exciting language to learn, and it would be tragic if such a small thing kept me from learning.

New Topic/Question
Reply




MultiQuote






|