Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaxMind Local not work #1613

Open
amowu opened this issue Apr 21, 2023 · 5 comments
Open

MaxMind Local not work #1613

amowu opened this issue Apr 21, 2023 · 5 comments

Comments

@amowu
Copy link

amowu commented Apr 21, 2023

BEFORE POSTING AN ISSUE, PLEASE MAKE SURE THE PROBLEM IS NOT ADDRESSED IN THE README!

Expected behavior

I an follow https://github.com/alexreisner/geocoder/blob/master/README_API_GUIDE.md#maxmind-local-maxmind_local---experimental steps

When I run:

# generate migration to create tables
rails generate geocoder:maxmind:geolite_city

I got correct DB tables.

And When I run:

# download, unpack, and import data
rake geocoder:maxmind:geolite:load PACKAGE=city LICENSE_KEY=<KEY>

It should be work.

Actual behavior

But it got:

SocketError: Failed to open TCP connection to geolite.maxmind.com:80 (getaddrinfo: nodename nor servname provided, or not known)


Caused by:
SocketError: getaddrinfo: nodename nor servname provided, or not known

Tasks: TOP => geocoder:maxmind:geolite:load => geocoder:maxmind:geolite:download
(See full trace by running task with --trace)

Steps to reproduce

https://github.com/alexreisner/geocoder/blob/master/README_API_GUIDE.md#maxmind-local-maxmind_local---experimental steps

Environment info

  • Geocoder version: 1.8.1
  • Rails version: 6.1.6.1
  • Database (if applicable):
  • Lookup (if applicable):
@RongRongTeng
Copy link

RongRongTeng commented May 11, 2023

Is this problem solve after this PR ? 🙏🏻

@amowu
Copy link
Author

amowu commented May 15, 2023

Is this problem solve after this PR ? 🙏🏻

@RongRongTeng you are right.

#1600 merge only the latest version of the master branch has the LICENSE_KEY.

The current version 1.8.1 does not have the LICENSE_KEY option.

But even if I change it to the master version, it still doesn't work.

- gem 'geocoder', '1.8.1'
+ gem 'geocoder', github: 'alexreisner/geocoder', ref: '3f9e9'

237614869-f75f7f91-a96a-4bf7-9b24-b75b25c63f84

The reason is that at line 33, it calls archive_url_path:

p = archive_url_path(package)

But in #1600, this method has already been renamed:

https://github.com/alexreisner/geocoder/pull/1600/files#diff-e70a403b9d56449ef46d7338bfa456ed872a01a51a8f5ac7a8a058137ece6eaaL97-R97

cc @coder2000

@coder2000
Copy link
Contributor

I thought I had accounted for all instances of the method calls. I will have a fix available for testing tomorrow if someone else doesn't do it first.

@richjdsmith
Copy link

@coder2000 did you end up building a fix?

@coder2000
Copy link
Contributor

No. If I remember they changed their download URIs. It shouldn't be too hard to find the new ones and add them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants