Created
April 9, 2012 21:58
-
-
Save lancelakey/2346849 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| │~/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