Answer the question
In order to leave comments, you need to log in
How to connect redis cloud on heroku?
I don't understand how to connect redis to heroku.
I added the redis cloud addon to the application, added the following to redis.rb:
if ENV["REDISCLOUD_URL"]
$redis = Redis.new(:url => ENV["REDISCLOUD_URL"])
else
$redis = Redis.new(:host => 'localhost', :port => 6379)
end
Errno::ECONNREFUSED: Connection refused - Unable to connect to Redis on 127.0.0.1:6379
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question