From: Jet Koten Date: 2010-01-23T05:07:17+09:00 Subject: Re: Argh?! :) kEND, $end and kELSE in a simple program Well, I've got it working now. In case anyone is interested, the final working version is: puts 'Say something to the virtual hard-of-hearing Grandpa:' counter=0 while true puts "the counter is #{counter}" said=gets.chomp year = (1930+rand(51)) if said=='GOODBYE' counter+=1 if counter==3 break end elsif said !=said.upcase puts 'HUH?! SAY IT LOUDER!' counter=0 else puts 'NO, NOT SINCE '+year.to_s+'!' counter=0 end end and my problem was I was decreasing my counter in the elsif and else when I really should have been zeroing it. I still don't know about running ruby 1.9 though. I'd like to run it but the answers to my questions below are still unknown to me. Should I start a new thread just about these questions, or will someone let me know here? Above all, thanks for the help. Just the right amount of instruction without spoiling the fun of figuring it out myself what I had done incorrectly. Thanks again! Jet Koten wrote: > Oops, I missed this message when I was reading the other replies. > > I'm running 1.8.7 on Mac OS X 10.4 (Tiger). When I installed Macports > and then installed a newer Ruby than is on OS X 10.4 it set me up with > 1.8.7. I renamed the old 10.4 ruby so it doesn't run anymore when I type > ruby. > > I'd like to run Rails, and especially Spree e-commerce. > > Should both of them and all the various gems and/or plugins they require > work OK with Ruby 1.9, and if so, how do I even install it with Macports > (the only way I'm comfortable installing things) if I already asked it > for Ruby and it gave me 1.8.7... ? > > Thanks again to everyone for all the help getting up and running. :) > > Roger Pack wrote: >> Judging from your error message, you might get a more helpful error >> message by running ruby 1.9 (if you're not) and/or running it ruby -w, >> which gives you indentation warnings. >> -r -- Posted via http://www.ruby-forum.com/.