Hi Richard, Thanks for the quick reply. I think I am calling things in the right order - it certainly works if I use an actual database file instead. This is what I have at the moment: DataMapper.setup(:default, ENV['DATABASE_URL'] || "sqlite3::memory:") class Page include DataMapper::Resource property :id, Serial property :title, String, :required => true end DataMapper.auto_upgrade!
Is there anything wrong there? cheers, DAZ On Oct 24, 4:47 pm, Richard Conroy <[email protected]> wrote: > On Sun, Oct 24, 2010 at 4:44 PM, DAZ <[email protected]> wrote: > > Hi, > > > I'm trying to use an in-memory setup: > > DataMapper.setup(:default, 'sqlite::memory:') > > > But every time I try to save a record, I can't retrieve it. I get this > > error: > > DataObjects::SyntaxError: no such table: > > You need to call DataMapper.auto_upgrade! or DataMapper.auto_migrate! in > order to create your schema. The order of declaration of your models, or > requiring your model files is important. > > --http://richardconroy.blogspot.com|http://twitter.com/RichardConroy -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
