Can't get a test app going...

18 views
Skip to first unread message

gboersma

unread,
Apr 16, 2010, 3:59:18 PM4/16/10
to DataMapper MongoDB Adapter
I have had success building the latest dm-mongo-adapter from master,
with the latest dm (dm-core dm-migrations dm-aggregates) gems from
master.

I then created a test Rails 2.3.5 app using the rails_datamapper gem
with a test action to create some objects in the database.

However, the app is hanging under ruby 1.8.7 when I try to execute the
test action.

Here's what I have for my model:

model.rb:
class Model
include DataMapper::Mongo::Resource
property :id, ObjectID
property :name, String
property :tags, String
end

Here's what I have for my test:

test_model = Model.new
test_model.name = "Test Model"
test_model.tags = "test model"
test_model.save!

My database.yml entry looks like this:

development:
adapter: mongo
database: testapp_dev
host: localhost
port: 28017

Nothing yet in the database at the time of the test.

The app hangs when save! is executed.

Any ideas? Anyone have an example app I can start with and validate
that this is not specific to the way I set up the testapp?

Thanks,
Gerald



--
Subscription settings: http://groups.google.com/group/dm-mongo-adapter/subscribe?hl=en

solnic

unread,
Apr 18, 2010, 7:44:05 AM4/18/10
to DataMapper MongoDB Adapter
On Apr 16, 9:59 pm, gboersma <gerald.boer...@gmail.com> wrote:
> I have had success building the latest dm-mongo-adapter from master,
> with the latest dm (dm-core dm-migrations dm-aggregates) gems from
> master.
>
> I then created a test Rails 2.3.5 app using the rails_datamapper gem
> with a test action to create some objects in the database. ...

It's not a good idea to run edge DM with Rails2. Just go for Rails3,
here everything is explained: http://github.com/datamapper/dm-rails

solnic
Reply all
Reply to author
Forward
0 new messages