Hi, this code used to work, but for some reason it won’t now:
[… load models]
DataMapper.setup(:default, “mysql://cm:[email protected]/cm”)
DataMapper.setup(:lite, “sqlite3:///home/tigre/cm.sqlite”)
DataMapper.finalize
DataMapper.repository(:lite).auto_migrate!
DataMapper.repository(:lite) do
w = WorkCenter.new(:name => “Foo”)
w.save
end
Now I get this error:
/usr/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:147:in
`execute_reader’: no such table: work_centers (DataObjects::SyntaxError)
the cm.sqlite file is created but is zero bytes long.
What am I doing wrong?