Last active
August 29, 2015 14:13
-
-
Save jlgasparrini/4702d9999b1d6d63c13d to your computer and use it in GitHub Desktop.
Redis configuration for deploy to heroku server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/redis.rb | |
if ENV["REDISCLOUD_URL"] | |
uri = URI.parse(ENV["REDISCLOUD_URL"]) | |
$redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password) | |
else | |
$redis = Redis.new(:host => 'localhost', :port => 6379) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment