dm-redis-adapter icon indicating copy to clipboard operation
dm-redis-adapter copied to clipboard

Undefined method `aggregate'

Open kyledayton opened this issue 12 years ago • 4 comments

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?

kyledayton avatar Feb 16 '13 00:02 kyledayton

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.

whoahbot avatar Feb 18 '13 00:02 whoahbot

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

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

kyledayton avatar Feb 18 '13 02:02 kyledayton

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.

whoahbot avatar Feb 26 '13 03:02 whoahbot

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.

mikbe avatar Jul 25 '13 18:07 mikbe