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