From: Brian Candler Date: 2008-12-31T03:52:04+09:00 Subject: Re: Creating a class for returing DB results Darin Ginther wrote: > OK, A little more help... > I'm getting an "uninitialized constant Dbutil" error You need to use the keyword 'class' not 'Class' You also need #{@table}, or I think #@table is sufficient, inside your quoted string. Otherwise the literal characters "@table" will be used. > Also - what's the best way to include this class in an outside file? > Say I'm exercising it from webtest.rb? require 'dbutil' See $LOAD_PATH if this file is not in the current directory. A common idiom is $LOAD_PATH.unshift File.dirname(__FILE__)+"/lib" if there is a lib/ subdirectory adjacent to the file which is being run. -- Posted via http://www.ruby-forum.com/.