I did this many times before, but it keeps cropping up (I’m not at all sure why.) Here it is…
require 'rubygems'
require 'uri'
require 'redis'
#RedisToGo gives you the "redis://" uri.
uri = URI.parse('redis://username:password@host:1234/')
unless uri.nil?
p uri.host
p uri.port
p uri.password
p '---'
r = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password, :thread_safe => true)
p r.info
end