Closed morgoth closed 9 years ago
I'm using GeoLiteCountry database from debian package https://packages.debian.org/jessie/geoip-database - currently in version of 1.6.2-4 which depends on geoip-database in version 20150317-1
When I lookup for a country I'm getting 0 as country code.
g = GeoIP.new('tmp/GeoIP.dat') g.country("91.193.208.126").to_hash => {:request=>"91.193.208.126", :ip=>"91.193.208.126", :country_code=>0, :country_code2=>"--", :country_code3=>"--", :country_name=>"N/A", :continent_code=>"--"}
As there is some binary search going on, I don't know how to debug it https://github.com/cjheath/geoip/blob/master/lib/geoip.rb#L873-L887
Apologies. Recent rework had mis-assigned this type of database to an IPv6 section.
Thanks for the quick fix.
I'm using GeoLiteCountry database from debian package https://packages.debian.org/jessie/geoip-database - currently in version of 1.6.2-4 which depends on geoip-database in version 20150317-1
When I lookup for a country I'm getting 0 as country code.
As there is some binary search going on, I don't know how to debug it https://github.com/cjheath/geoip/blob/master/lib/geoip.rb#L873-L887