Louis
unread,Aug 19, 2010, 6:46:10 PM8/19/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Machinist Users
Hello there,
I'm using Datamapper and Sinatra, and I keep getting this error when I
try to use Machinist:
DataMapper::RepositoryNotSetupError: Adapter not set: default. Did
you forget to setup?
Though, I think that DataMapper is properly set up:
DataMapper.setup(:default, "mysql://root:@localhost/blog")
I found a few posts explaining that the order of the loadings is
important, so I have:
require "machinist/data_mapper"
require "sham"
require "test/blueprints.rb"
require "models/post"
Then in blueprint.rb:
require "machinist/data_mapper"
require "sham"
require "models/post"
Sham.define do
...
end
Post.blueprint do
...
end
10.times { Post.make! }
I would be glad to hear any suggestion you may have. Thank you very
much :-)