ArgumentError: odd number of arguments for Hash when trying to connect to
redis
I'm trying to get rails connect to redis by following this tutorial. But
I'm getting the following error when I try $redis = Redis.new(:host =>
'localhost', :port => 6379) or even just Redis.new. I've tried the new
notation as well (host: 'localhost',port: 6379). Redis works (ping-PONG
test via redis-cli passes).
ArgumentError: odd number of arguments for Hash
from /var/lib/gems/1.9.1/gems/redis-2.1.1/lib/redis.rb:65:in `[]'
from /var/lib/gems/1.9.1/gems/redis-2.1.1/lib/redis.rb:65:in `info'
from /var/lib/gems/1.9.1/gems/redis-2.1.1/lib/redis.rb:606:in `inspect'
from
/var/lib/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands/console.rb:90:in
`start'
from
/var/lib/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands/console.rb:9:in
`start'
from
/var/lib/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands.rb:64:in
`<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
What am I doing wrong?
Config Details:
$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
$ rails -v
Rails 4.0.0
No comments:
Post a Comment