metamaps--metamaps/config/initializers/redis.rb

6 lines
243 B
Ruby
Raw Normal View History

2014-02-24 07:22:40 +00:00
if Rails.env.development?
2014-02-10 07:03:06 +00:00
$redis = Redis.new(:host => 'localhost', :port=> 6379)
2014-02-24 07:22:40 +00:00
elsif Rails.env.production?
uri = URI.parse(ENV["REDISTOGO_URL"])
$redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
end