[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Can Not Get Ruby to Run in Windows CMD Window

Brad

2/3/2007 2:21:00 PM

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

2 Answers

Kevin

2/3/2007 3:53:00 PM

0

On Feb 3, 9:21 am, "Brad" <bradask...@gmail.com> wrote:
> 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

David Mullet

2/3/2007 4:24:00 PM

0

On Feb 3, 9:21 am, "Brad" <bradask...@gmail.com> wrote:
> 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