[Rails] Datamapper problem "no such table"
Hi, this code used to work, but for some reason it won't now:
[... load models]
DataMapper.setup(:default, "mysql://cm:password@172.26.0.3/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?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home