ruby-on-railsrubyredisredis-rails

Ruby On Rails, Redis::CommandError: ERR wrong number of arguments for 'set' command


Why does this code

redis.set("test", true, ex: 24.hours)

return the following exception?

Redis::CommandError: ERR wrong number of arguments for 'set' command

I use these gems


Solution

  • It could be a problem with the redis version, check this for more information: https://github.com/redis/redis-rb/issues/372