Newbie- cmd wont display .rb file

So I just installed ruby and I’m pretty sure I have it set up right, but
when I try and run a .rb file typing “ruby” and then the file name in
the cmd all I get is a blank space. Not even an error. The file is a
simple beginners one that just says puts “hello world”. My computer uses
windows 8.

Did you resolved this? Can you give more information?

No I have not resolved it yet. More details like what?

Show us the code inside the file, and the exact command you’re executing
to run it. Without this information we cannot help you.

My instinct says that you’ve wrapped your code up in a method and
forgotten to call the method, but I can’t tell that without seeing the
code.

No no method. Alls it says is:
puts
“hello”
I was testing to see if it worked. I typed ruby hello.rb into command.
The only output was that it seemed to skip a few lines. Just a blank
black space. No errors.

to go between folders, cd “folder name withouth the double quotes”

type dir to find the current listing in the current directory.

I was in the correct folder. It didn’t give me an error saying the file
didn’t exist. Though I didn’t type the command in double quotes.

No no method. Alls it says is:

puts
“hello”

The first line tells ruby to output the argument you supplied to puts(),
followed by a carriage return(known as a ‘newline’ in computer
programming). Because you didn’t supply an argument to the puts()
method, ruby just outputs the newline, which your terminal displays as
a blank line.

The second line tells ruby to create a String(that’s what double quotes
do), and because you didn’t assign the String “hello” to a variable, it
is discarded.

Then your program ends.

Any questions?

go to Start on lower left hand corner and type “cmd”
then go to the correct folder that contain your hello.rb file
then when u are in the folder that contain your hello.rb, u type “ruby
hello.rb”

Well that’s all the tutorial told me to put. So then how would I type it
to get it to display “hello” ? And thank you for the help.

Well that’s all the tutorial told me to put.

Do you have a link to the tutorial?

So then how would I type it
to get it to display “hello”

Reread my explanation of your code:

==
The first line tells ruby to output the argument you supplied to puts(),
followed by a carriage return(known as a ‘newline’ in computer
programming). Because you didn’t supply an argument to the puts()
method…

Does that give you any ideas?

Ahh…i get it. Everything shows up fine now. Thank you for your
assistance in this matter.