简体   繁体   中英

"You are connecting to Redis v3.2.9, Sidekiq requires Redis v4.0.0 or greater?"

I recently updated Sidekiq in my Gemfile:

gem 'sidekiq', '~> 6.0', '>= 6.0.4'
gem 'redis', '~> 4.1', '>= 4.1.3'

But ever since updating, I get this error when running sidekiq in Terminal:

You are connecting to Redis v3.2.9, Sidekiq requires Redis v4.0.0 or greater.

I made sure to uninstall old versions of both Sidekiq and Redis, but Sidekiq is still trying to connect to 3.2.9. My Gemfile.lock has:

sidekiq (6.0.4)
  connection_pool (>= 2.2.2)
  rack (>= 2.0.0)
  rack-protection (>= 2.0.0)
  redis (>= 4.1.0)

Am I misreading this error? How would I tell Sidekiq to use the correct version of Redis?

It was not a gem dependency issue. I ran brew upgrade redis , restarted redis-server , and that fixed it.

For me the problem was that bundle exec foreman s used Redis version specified here . Monkey patching with 6.2.5 helped, but the correct way to fix it is to pin your redis version in app_config.yml:

redis:
    <<: *redis
    version: 4.2.0 # or the version you are using

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM