Hacker News new | past | comments | ask | show | jobs | submit login

Great stuff!

Also, for the extremely anal, uri-redis is aware of the database number:

    require 'uri-redis'
    conf = URI.parse 'redis://localhost:6379/1'
    conf.host      # => localhost
    conf.port      # => 6379
    conf.db        # => 1



Redis also manages URLs directly: Redis.connect('redis://localhost:6379/1') works as expected.


That should be Redis.connect(:url => 'redis://localhost:6379/1')


I had no idea! And I've been parsing them myself all this time.


Does that work with passwords?


Yes, works as expected.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: