undefined method 'find_by_sql'

Why would I get an undefined method `find_by_sql' for #Example:
0x981a4e4> for error when trying to use the find_by_sql method in my
model?

  def init_dictionaries
    tables = find_by_sql( "SHOW TABLES FROM thesaurus" )
    @@tables = tables.collect{ |t| t.Tables_in_thesaurus }
  end

Why would I get an undefined method `find_by_sql' for #Example:
0x981a4e4> for error when trying to use the find_by_sql method in my
model?

def init_dictionaries
tables = find_by_sql( "SHOW TABLES FROM thesaurus" )

I think that should be self.find_by_sql as it is a class method.

@@tables = tables.collect{ |t| t.Tables_in_thesaurus }

Not related to your problem but class variables are usually not a good idea.

Colin