-
Notifications
You must be signed in to change notification settings - Fork 1
uninitialized constant Zermelo::Records #22
Comments
Digging more, it doesn't appear that the Any chance you could share more insight regarding when to pick the RedisSet or RedisSortedSet? Thanks in advance |
Using the class Post
include Zermelo::Records::RedisSet
define_attributes :title => :string,
:score => :integer,
:timestamp => :timestamp,
:published => :boolean
end It appears that the id is not automatically generated:
Which leads to calling
I'm not sure at this point if I'm supposed to keep track of the ids? Seems counter-intuitive but let me know. I tried to pass an id by hand as well:
|
It's looking like you've not initialised For the inclusion of the gem, in this case require 'zermelo'
require 'zermelo/records/redis' should be enough in terms of the requires, and the first of those would be implicit in the Gemfile, yeah. Ids are left up to the implementing classes, at the moment. It's a design decision based on what I needed it for (an app that wanted that level of control), but I did have plans to make that more pluggable and provide some standard implementations. |
Also, for a Set or SortedSet, it really depends on how you'd want to query that data. Is set inclusion all you care about, or is the order (and possible range querying) desirable? |
Thanks for the quick answer! Indeed after requiring the redis gem, I got a little further but unfortunately a different error popped up:
For what it's worth, when trying to run
I'm not too sure about the Thanks again for the help, much much appreciated! |
Sorry, I've not been well -- I haven't tested this with ActiveModel past v4, so something may have changed in that. I'll fix this when I get some time. |
@ali-graham no worries please, I just wanted to give some feedback and making sure I was not missing anything. Thanks for sharing your wok with this gem, it's much appreciated and I hope you feel better soon 👨⚕️ |
I had some travel too, so my time's been a bit broken up. There have been some extensive changes in recent versions of ActiveModel, I'll iron out the remaining bugs in the branch when I get a chance (it seems like my code can continue doing what it was doing, it just needs to use new wrapper objects etc.), and then work out the proper points to conditionally use those in |
Hi @ali-graham,
Running into an issue when trying to include Zermelo:
Simple Gemfile:
I must be missing something but I also tried to require
zermelo/records/redis
directly.Thanks in advance for the help!
UPDATE: it looks like you need to require more than just the gem
The text was updated successfully, but these errors were encountered: