Skip to content

Instantly share code, notes, and snippets.

@danielberlinger
Created November 22, 2011 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielberlinger/1386036 to your computer and use it in GitHub Desktop.
Save danielberlinger/1386036 to your computer and use it in GitHub Desktop.
Simple RedisToGo connection
require 'rubygems'
require 'uri'
require 'redis'
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment