I am using redis as a read cache. I have created an initializer
config/initializer/redis.rb
$redis = Redis.new(:host => ENV[\"REDIS_HOST\"], :port =&
if you don't already use another Rails.cache I advise you to just use that mechanism with redis.
The gem redis-store makes this realy easy (https://github.com/redis-store/redis-store)
This way you can just do Rails.cache.reconnect
and all is dandy
https://github.com/redis-store/redis-store/issues/21#issuecomment-948569
It also allows you to use the awesome Rails.cache API, which has some neat features: http://api.rubyonrails.org/classes/ActiveSupport/Cache/Store.html