mloughran/em-hiredis — Issue #9: Database is not selected automatically
Author: marcboeker
Created: 2011-10-31 07:16:34+00:00
State: open

redis://user:password@localhost:6379/2

Using this URI to connect to Hiredis, the database is not selected automatically. It always defaults to DB 0. Inspecting the Client object after creation, the instance variable @db has the correct value.

@db = '2'

But when I'm doing a manual select of the DB, it works like a charm.

con = EM::Hiredis.connect('redis://user:password@localhost:6379/2')
con.select('2')

Thanks Marc