Can Not Get Ruby to Run in Windows CMD Window

B

Brad

Hi All,

As the subject says.."Can Not Get Ruby to Run in Windows CMD Window"

I have Ruby installed: C:\Ruby

I was reading the Programming Ruby - The Pragmatic Programmers'
Guide. It says to bring up the Shell Prompt and type Ruby, then puts
"Hello World"

When I type Ruby <enter> puts "Hello World" nothing happens. What am
I doing wrong?

Thank you.

Brad
 
K

_Kevin

Hi All,

As the subject says.."Can Not Get Ruby to Run in Windows CMD Window"

I have Ruby installed: C:\Ruby

I was reading the Programming Ruby - The Pragmatic Programmers'
Guide. It says to bring up the Shell Prompt and type Ruby, then puts
"Hello World"

When I type Ruby <enter> puts "Hello World" nothing happens. What am
I doing wrong?

Thank you.

Brad

the ruby executable reads from stdin (and is totally silent) until you
send it a ctrl-D, I think. At that point it will process the text you
typed in.

_Kevin
 
M

mully

Hi All,

As the subject says.."Can Not Get Ruby to Run in Windows CMD Window"

I have Ruby installed: C:\Ruby

I was reading the Programming Ruby - The Pragmatic Programmers'
Guide. It says to bring up the Shell Prompt and type Ruby, then puts
"Hello World"

When I type Ruby <enter> puts "Hello World" nothing happens. What am
I doing wrong?

Thank you.

Brad

In addition to what Kevin said, keep in mind that "ruby" runs the Ruby
interpreter, while "irb" runs the interactive ruby interpreter.

Mully
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top