# Can Not Get Ruby to Run in Windows CMD Window

**URL:** <https://www.ruby-forum.com/t/can-not-get-ruby-to-run-in-windows-cmd-window/84350>\
**Category:** Ruby\
**Created:** [February 3, 2007, 3:25pm UTC](https://www.ruby-forum.com/t/can-not-get-ruby-to-run-in-windows-cmd-window/84350 "2007-02-03T15:25:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/59ef9b/32.png) [@brad](https://www.ruby-forum.com/u/brad)\
**Post date:** [February 3, 2007, 3:25pm UTC](https://www.ruby-forum.com/t/can-not-get-ruby-to-run-in-windows-cmd-window/84350/1 "2007-02-03T15:25:38Z")

</div>

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 puts “Hello World” nothing happens. What am  
I doing wrong?

Thank you.

Brad

---

<div class="post-metadata">

**Author:** ![brad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/59ef9b/32.png) [@brad](https://www.ruby-forum.com/u/brad)\
**Post date:** [February 3, 2007, 3:33pm UTC](https://www.ruby-forum.com/t/can-not-get-ruby-to-run-in-windows-cmd-window/84350/2 "2007-02-03T15:33:39Z")

</div>

Type Ctrl+Z after that and you would get the output. I would recommed  
that  
you type your programme in an editor and then run them using

c:\> ruby yourprogramfile.rb

The best way however if you would like to learn ruby is use Interactive  
Ruby  
(IRB). Typing _irb_ at the command prompt would give you the IRB shell.

---

<div class="post-metadata">

**Author:** ![brad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/59ef9b/32.png) [@brad](https://www.ruby-forum.com/u/brad)\
**Post date:** [February 3, 2007, 4:55pm UTC](https://www.ruby-forum.com/t/can-not-get-ruby-to-run-in-windows-cmd-window/84350/3 "2007-02-03T16:55:44Z")

</div>

On Feb 3, 9:21 am, “Brad” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> When I type Ruby 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

---

<div class="post-metadata">

**Author:** ![brad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/59ef9b/32.png) [@brad](https://www.ruby-forum.com/u/brad)\
**Post date:** [February 3, 2007, 5:25pm UTC](https://www.ruby-forum.com/t/can-not-get-ruby-to-run-in-windows-cmd-window/84350/4 "2007-02-03T17:25:49Z")

</div>

On Feb 3, 9:21 am, “Brad” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> When I type Ruby 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
