Forum: Ruby doesnt work

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
139a2a2f6b330cc59a8dc6384bbf8837?d=identicon&s=25 Corey (Guest)
on 2006-05-07 08:20
Hello i just started learing ruby tonight but the first little code
example from the book doesnt work. It creates a ruby file and when i
click on the ruby file a cmd window opens up and shows me the first line
"Say something, please: " so i write something there and press return
and then the cmd window just shuts every time.

print "Say something, please: "
user_input = gets.chomp
print "You said #{user_input} .\n"
print "Backwards, it reads #{user_input.reverse} .\n"
print "The message is #{user_input.length}  characters long.\n"
42172acdf3c6046f84d644cb0b94642c?d=identicon&s=25 Pat Maddox (pergesu)
on 2006-05-07 08:31
(Received via mailing list)
nah it works fine.  Add another input statement in there to see.
What's happening is the output gets displayed, and the window closes
as soon as the process ends.  It's just too fast for you to see.

Start->run "cmd", and then run your ruby script from in there.

Pat
139a2a2f6b330cc59a8dc6384bbf8837?d=identicon&s=25 Corey (Guest)
on 2006-05-07 08:37
Pat Maddox wrote:
> nah it works fine.  Add another input statement in there to see.
> What's happening is the output gets displayed, and the window closes
> as soon as the process ends.  It's just too fast for you to see.
>
> Start->run "cmd", and then run your ruby script from in there.
>
> Pat

oh ok thanks alot, that worked. Quick response too i was expecting to
wait lke 24hrs, lol.

Thanks again.
31ab75f7ddda241830659630746cdd3a?d=identicon&s=25 Austin Ziegler (Guest)
on 2006-05-10 23:44
(Received via mailing list)
On 5/7/06, Corey <0011@hush.com> wrote:
> wait lke 24hrs, lol.
Please note that you are posting through an interface to a mailing
list, ruby-talk (ruby-talk@ruby-lang.org). People get your messages in
their inboxes and respond to you that way. Some people use another
mirror, which is comp.lang.ruby.

-austin
E0d864d9677f3c1482a20152b7cac0e2?d=identicon&s=25 Robert Klemme (Guest)
on 2006-05-11 17:36
(Received via mailing list)
2006/5/10, Austin Ziegler <halostatue@gmail.com>:
> Please note that you are posting through an interface to a mailing
> list, ruby-talk (ruby-talk@ruby-lang.org). People get your messages in
> their inboxes and respond to you that way. Some people use another
> mirror, which is comp.lang.ruby.

Not any more - or at least not at the moment.  The gateway was
switched off AFAIK.

robert
This topic is locked and can not be replied to.