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
- redis (3.2.0)
- redis-rails (4.0.0)
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
It could be a problem with the redis version, check this for more information: https://github.com/redis/redis-rb/issues/372
The above answer is correct. You need to update Redis. If you're on mac, follow these steps to quickly update Redis:
$ make
$ make install
And if you have an older version of Redis running at the moment, kill it:
$ ps -ef | grep redis
, the PID is the 2nd number on the 1st rowsudo kill <the PID>
That's it