From: Siep Korteling Date: 2008-06-30T08:58:27+09:00 Subject: Re: Newbie Question On Ruby Quiz Kyle Murphy wrote: > I'm a programming and Ruby newbie. I wanted to build some programs, so > I started Best of Ruby Quiz. > > The first quiz is MadLibs (http://www.rubyquiz.com/quiz28.html) and, > given the answer, I can't even get it to work. > (...) > > # usage > unless ARGV.size == 1 and test(?e, ARGV[0]) > puts "Usage: #{File.basename($PROGRAM_NAME)} MADLIB_FILE" > exit > end (..) > > > And a .madlib file with (copied from the book): > Our favorite language is ((gem:a gemstone)). We think ((gem)) is > better than ((a gemstone)). > > > > Whenever I run the .rb file I get this error: Usage: madlib.rb > MADLIB_FILE > > My question is basically: how do I make this program work? Thank you. It's trying to tell you that you're supossed to run madlib.rb with an argument, specifying which .madlib file to use. So don't start it with: madlib.rb use madlib.rb whatever_you_named_it.madlib instead. Hth, Siep -- Posted via http://www.ruby-forum.com/.