riak-ripple / ripple

A rich Ruby modeling layer for Riak, Basho's distributed database
Other
619 stars 152 forks source link

NoMethodError: undefined method `except' for #<Array:0x007fc6d31a8690> #270

Closed alinpopa closed 12 years ago

alinpopa commented 12 years ago

Hi all,

I keep getting this exception (as the one from the title) when trying to map an entity to a riak value which has the following content "['string1', 'string2', 'string3']" and this is how my mapping looks like:

class Article include Ripple::Document end

All that I'm doing, is an Article.list (I know that's something that should be done in production, but I'm doing it only in dev env). Should I use something like "{'keys":['string1','string2','string3']}" value instead ?

Thanks, Alin

seancribbs commented 12 years ago

Ripple expects the top-level JSON entity to be an object (hash), not an array. Just use the low-level interface (Riak::RObject) unless you absolutely need the extra stuff.

alinpopa commented 12 years ago

Yeah, great; good to know. Thanks Sean, Alin