Skip to content
This repository has been archived by the owner on Sep 2, 2019. It is now read-only.

Undefined method `aggregate' #44

Open
kyledayton opened this issue Feb 16, 2013 · 4 comments
Open

Undefined method `aggregate' #44

kyledayton opened this issue Feb 16, 2013 · 4 comments

Comments

@kyledayton
Copy link

When I try to call #count on my DM resource, I receive the following exception:

NoMethodError: undefined method `aggregate' for #DataMapper::Adapters::RedisAdapter:0x007fb60e074f60

Any idea?

@whoahbot
Copy link
Owner

Hi @kdayton- can you put together a gist, or a failing spec for me to reproduce? I don't get the same error when I run .count locally.

@kyledayton
Copy link
Author

https://gist.github.com/kdayton-/4974729

I'm using redis v2.6.7 and ruby 1.9.3p286 on OSX 10.8.2

@whoahbot
Copy link
Owner

Seems to be a problem when including the entire data_mapper metagem.

If you don't require 'data_mapper', and just require dm-core, it should work.

Not sure what the issue is, but you shouldn't need it for most use-cases.

@mikbe
Copy link

mikbe commented Jul 25, 2013

Same problem here. It appears to be a conflict, oddly enough, with dm-aggregates.

You can test this by changing your gem file to gem 'dm-core' see if it works, then add gem 'dm-aggregates' and then you should get the exact same error.

Keep in mind you may have to manually add the other dm-whatevers manually. See https://github.com/datamapper/data_mapper for a list of gems included in the the meta gem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants