From: Archie Call Date: 2005-12-29T14:21:43+09:00 Subject: Re: new to ruby, "requier" not working? > ~/projects/test.rb > ~/projects/wordlist.rb > > > test.rb starts with: > require 'wordlist' > > and wordlist.rb just has: > words = { > 'starmonkeys' => 'Phil and Pete, those prickly chancellors of the > New Reich', > 'catapult' => 'chucky go-go', 'firebomb' => 'Heat-Assisted Living', > 'Nigeria' => "Ny and Jerry's Dry Cleaning (with Donuts)", > 'Put the kabosh on' => 'Put the cable box on' > } > > When i try and run test.rb it says that words is an undefined variable. > If i put the definition of words directly into the test.rb file it > works just fine. Dave, I am a newbie also. From the manual "require" and "load" are similar. Maybe try "load 'wordlist.rb'". Possibly your default directory is not ~/projects/ so the file cannot be found. ...Arch -- Posted via http://www.ruby-forum.com/.