Skip to content

Instantly share code, notes, and snippets.

@lancelakey
Created April 9, 2012 21:58
Show Gist options
  • Select an option

  • Save lancelakey/2346849 to your computer and use it in GitHub Desktop.

Select an option

Save lancelakey/2346849 to your computer and use it in GitHub Desktop.
│~/bin/readis_safe (master) > redis-cli
│redis 127.0.0.1:6379> redis-cli rpush list1 one two three four five six
│(error) ERR unknown command 'redis-cli'
│redis 127.0.0.1:6379> rpush list1 one two three four five six
│(integer) 6
│redis 127.0.0.1:6379> rpush list2 one two three
│(integer) 3
│redis 127.0.0.1:6379> rpush list3 one
│(integer) 1
~/bin/readis_safe (master) > irb
>>
?> require 'redis'
WARNING: using the built-in Timeout class which is known to have issues when used for opening connec
tions. Install the SystemTimer gem if you want to make sure the Redis client will not hang.
=> true
>>
?> redis = Redis.new
=> #<Redis client v2.2.2 connected to redis://127.0.0.1:6379/0 (Redis v2.4.10)>
>> redis.rpush("list4", "one")
=> 1
>> redis.rpush("list5", "one", "two")
ArgumentError: wrong number of arguments (3 for 2)
from (irb):6:in `rpush'
from (irb):6
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment