deploying redis to heroku unable to connect

前端 未结 3 1087
别跟我提以往
别跟我提以往 2020-12-25 15:12

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         


        
3条回答
  •  天涯浪人
    2020-12-25 15:33

    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

提交回复
热议问题