Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `add' for #<Flipper::Adapters::Redis:0x00007ff5a6203a48> #391

Closed
stlewis opened this issue Jan 15, 2019 · 3 comments
Closed

Comments

@stlewis
Copy link

stlewis commented Jan 15, 2019

Given the following configuration:

Flipper.configure do |config|
  config.default do
    client = Redis.new
    adapter = Flipper::Adapters::Redis.new(client)
    Flipper.new(adapter)
  end
end

Upon trying to invoke this line:

  Flipper.enable(:my_feature)

I'm getting back this error/trace:

/Users/stevelewis/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/flipper-0.16.0/lib/flipper/adapters/memoizable.rb:48:in add': undefined method add' for #<Flipper::Adapters::Redis:0x00007ff5a6203a48> (NoMethodError)

FWIW, in my Gemfile:

gem 'flipper'
gem 'flipper-redis'

Do I need to peg one/both of these down to a version to get them to play nicely together?

@AlexWheeler
Copy link
Collaborator

Hey @stlewis I see that you're using flipper 0.16.0, but what version of redis and flipper-redis are you running?

I'm thinking your redis gem may be an older version than flipper-redis requires so bundler is resolving to use a really old version of flipper-redis that does not have a redis version constraint on it

@stlewis
Copy link
Author

stlewis commented Jan 15, 2019

@AlexWheeler It turns out my version of Redis was actually too new, but you had the right idea! I made sure that my redis gem was grabbing an appropriate version, and re-installed flipper-redis.

Thanks for the help!

@stlewis stlewis closed this as completed Jan 15, 2019
@AlexWheeler
Copy link
Collaborator

Great! I'll find some time to try out/test flipper-redis with redis > 4.0 and bump version constraint if all is good

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

No branches or pull requests

2 participants