Quantcast
Channel: Active questions tagged redis+ruby-on-rails - Stack Overflow
Viewing all articles
Browse latest Browse all 873

Redis::CannotConnectError: Error connecting to Redis SocketError: getaddrinfo: nodename nor servname provided, or not known

$
0
0

I'm getting the above errors when I try to run rails db:seed, which uses Sidekiq to enqueue jobs for database generation. I've been trying a variety of fixes related to getting/setting the correct REDISCLOUD_URL variable without success.

My redis.rb file looks like this:

$redis = Redis.newurl = ENV["REDISCLOUD_URL"]if url  Sidekiq.configure_server do |config|    config.redis = { url: url }  end  Sidekiq.configure_client do |config|    config.redis = { url: url }  end  $redis = Redis.new(:url => url)end

I'm sure the solution will be something to do with resolving SocketError: getaddrinfo: Name or service not known, but having spent many hours trying to fix this I'm still stumped. Any help would be greatly appreciated!


Viewing all articles
Browse latest Browse all 873

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>