Geocode failed: Could not load geoip dependency
thebravoman opened this issue · comments
Deploying on heroku and the error is
Geocode failed: Could not load geoip dependency. To use MaxMind Local lookup you must add the geoip gem to your Gemfile or have it installed in your system.
From the heroku rails console we see that the file is locate there.
irb(main):011:0> `ls /usr/share/GeoIP/GeoIP.dat`
=> "/usr/share/GeoIP/GeoIP.dat\n"
Gemfile is
# Geocoding
# https://github.com/ankane/authtrail#local-geocoding
gem "geocoder"
gem "maxminddb"
config/initializers/geocoder.rb is
# https://github.com/ankane/authtrail#local-geocoding
Geocoder.configure(
ip_lookup: :maxmind_local,
maxmind_local: {
file: "/usr/share/GeoIP/GeoIP.dat",
package: :country
}
)
I guess that by following the readme and with this setup it should work, but it does not. Version is
authtrail (0.4.3)
geocoder (1.8.1)
maxminddb (0.1.22)
Hey @thebravoman, you'll need to use the geoip
gem instead of maxminddb
. I've updated the docs in the commit above.