Learning how to create and save .rbs

So I am trying to create and run an .rb, a basic stepping stone.
After I typed and saved my .rb it ran like this-

irb(main):oo1:0) ruby 01hello.rb
Syntax Error: (irb):2: syntax error, unexpected tIDENTIFIER, expecting
$end
ruby 01hello.rb

Or

irb(main):001:0) ruby Helloworld.rb
NameError: uninitialized constant Helloworld
from (irb):1
from C:/Ruby/bin/irb:12:in ‘(main)’

I’ve been playing ping-pong with these two errors and others like them
but can’t seem to get the .rb to jut run.
Any and all advice,help,or direction is appreciated.

It seems you are trying to run ruby being already in irb. You should run
“ruby 01hello.rb” outside irb.

path/to/folder $ ruby 01hello.rb

Could you post the source of 01hello.rb

Max D. wrote in post #1116805:

Could you post the source of 01hello.rb

puts “Hello and welcome to Ruby P.ming.”

Thanks for the advice I’m experimenting with the windows command prompt
now.

Hello,

the problem is that you try to run your ruby script files from irb. If
you just want to run your scripts, run them from the command line like
you tried in irb - if you just type “ruby” in irb you’ll get the error
that ruby doesn’t know a variable/method “ruby”…

Your two errors are completely unrelated to that, though. The first one
tells you that the parser doesn’t know what to do with the . in the
line, while the second says that there simply is no constant Helloworld.

Regards, Calvin