Setup Redis on Windows and test it with a Ruby client

  • Download and install the Redis Windows installer from here:

 https://github.com/rgl/redis/downloads

  • Create Gemfile and install gem redis like this:

source “http://rubygems.org"
gem ‘redis’

  • Create new .rb file and add these lines to test it:

require "redis"

@host = "winsvr-qa-4.dev.com"

// port 6379 is the default port

@port = 6379
# redis = Redis.new
redis = Redis.new(:host => @host, :port => @port)
redis.set(“mykey”, “helloWorld123!”)
p redis.get(“mykey”)

  • Get the result