From: glennswest Date: 2009-04-08T14:24:19+09:00 Subject: Re: Can't find table with ActiveRecord in different thread. This is common in migrations. You need to tell the model that the its been modified. http://espaceblogs.blogspot.com/2007/05/update-newly-added-column-in-migration.html And you should make sure that its actually created, otherwise your going to have a race condition. On Apr 4, 7:22 am, David Masover wrote: > On Friday 03 April 2009 14:35:50 Juan Zanos wrote: > > > I'm not using rails, just ActiveRecord. > > Which is part of Rails. It's one of three or four major components that make > up Rails. So the Rails list is probably still worth a try. > > > Foo.find works in the > > thread that creates the tables.  I get the message "Could not  find > > table 'foos' "  in other threads. > > Is it possible to create the table before loading the model in any thread? > > Are you sure you've committed the transaction that had that "create table" > command in it? Are you sure that's all done before the other threads try the > find?