dm-redis-adapter
dm-redis-adapter copied to clipboard
Undefined method `aggregate'
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?
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.
https://gist.github.com/kdayton-/4974729
I'm using redis v2.6.7 and ruby 1.9.3p286 on OSX 10.8.2
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.
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.