From: Brian Candler Date: 2010-09-29T05:13:06+09:00 Subject: Re: error message, undefined method in Set Iain Barnett wrote: >> Then at the top of choice.rb I'd put require 'set'. > > That's what I was originally doing, but a lot of the advice I've read on > structuring projects is to remove the requires from individual > classes/files and put them in a central file with the name of the app > under lib. Personally I don't support that advice, but it's very much a matter of personal preference. I like each source file to declare its dependencies, because it lets them be re-used more easily, although it is easy to miss some. I don't know why in your case you have to require set.rb before choice.rb. If you could boil choice.rb down to a small test case which demonstrates the problem, it should be fairly easy to identify. But without seeing the code, I'm only guessing. -- Posted via http://www.ruby-forum.com/.