ive been trying to get resque to work with heroku. i can successfully get it to work in development mode, however when i try pushing to heroku i get
Errno::E
i fixed it. i can't believe it! my complete solution is
uri = URI.parse(ENV["REDISTOGO_URL"])
REDIS = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
Resque.redis = REDIS
verbatim. it works without explicitly setting the url because i guess heroku tries to set it up for me already
I got the same thing, so, basically Sidekiq was not grabbing the REDISCLOUD_URL from vars, it was grabbing REDIS_PROVIDER.
heroku config:set REDIS_PROVIDER=REDISCLOUD_URL
It worked like a charm.
For my setup I have /config/initializers/redis.rb
with these lines:
uri = URI.parse(ENV["REDISTOGO_URL"] || "redis://localhost:6379/" )
REDIS = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
My REDISTOGO_URL
is defined in my heroku configuration. You should be able to validate that by typing:
heroku config --app my_app
You'll see in the output the value for REDISTOGO_URL
You should copy your REDISTOGO_URL
directly from Redis To Go. You find it in by going to the instance in heroku and clicking on Add Ons -> Redis To Go.
Here are a couple pointers: