环境
问题
今天,我的应用程序坏了,我无法在日志中解决这个问题:
Errno::ECONNREFUSED (Connection refused - connect(2) for "freegeoip.net" port 80):看起来它是相关的,所以地理编码宝石
如果这个问题不发生在开发环境中的话,那就更奇怪了。
我检查了freegeoip,看上去好像坏了,这说明我不知道为什么要阻止我的应用程序运行。
$ curl http://freegeoip.net
curl: (7) couldn't connect to host发布于 2014-06-13 12:35:48
我是怎么解决的
begin
@location = "#{request.location.city} #{request.location.country_code}"
rescue => e
# handle the error here
logger.debug "http://freegeoip.net must be down!"
logger.debug e.message
endhttps://stackoverflow.com/questions/24193774
复制相似问题