mardi 24 janvier 2017

Redis_analytics when deployed on Heroku?

How do I connect to redis-server for redis_analytics gem on heroku? Locally I ran redis-server on a new terminal which solves my issue but how do I do one on heroku?

NoMethodError (undefined method `incr' for nil:NilClass):

vendor/bundle/ruby/2.3.0/gems/redis_analytics-1.0.1/lib/redis_analytics/visit.rb:81:in `counter'

vendor/bundle/ruby/2.3.0/gems/redis_analytics-1.0.1/lib/redis_analytics/visit.rb:49:in `record'

Config/initializers/redis.rb:

$redis = Redis.new(url: ENV["REDIS_URL"])

Aucun commentaire:

Enregistrer un commentaire