From: Ryan Davis Date: 2011-03-19T05:20:25+09:00 Subject: Re: "10 Minutes to Your First Ruby Application" Deconstructed! On Mar 17, 2011, at 23:06 , Shangz B. wrote: > Hello and warm wishes to everyone who reads my post :) > > I am a newbie to Ruby (That Rhymes!). I am attempting to complete the > "10 Minutes to YOur First Ruby Application" tutorial and I am stuck > about the syntax of the example they are using. I get this error > message: It might be worth your time to check out Chris Pine's book "Learn to Program" just to get the basics of the syntax and semantics down first. http://pine.fm/LearnToProgram/ -- it is a really fast read and I've had people do it in a weekend, so it is good timing. :) You can go through the original tutorial at that url, or buy the current PDF from pragprog.com. > "You must pass in the path to the file to launch. > > Usage: launcher.rb target_file" You're getting that from the following: > def help > print " > You must pass in the path to the file to launch. > > Usage: #{__FILE__} target_file > " > end > > if ARGV.empty? > help > exit so, your ARGV.empty? evaluates to true, so you print help and exit. Pass in some args on the command line and you will be on to your next problem to fix, which Jesus pointed out. One step at a time and you'll do fine. The Chris Pine book will do a good job of teaching you how all the different types of ruby variables work and how to get the syntax right. It should be a good suppliment to the thing you're currently reading.