Skip to content

Instantly share code, notes, and snippets.

@jlgasparrini
Last active August 29, 2015 14:13
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 jlgasparrini/4702d9999b1d6d63c13d to your computer and use it in GitHub Desktop.
Save jlgasparrini/4702d9999b1d6d63c13d to your computer and use it in GitHub Desktop.
Redis configuration for deploy to heroku server
# 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