Everyone seems to use MaxMind’s GeoIP, but their service (docs here) doesn’t seem like a good fit for Heroku for two reasons:
- You have to install a C library, which I don’t know how to do in heroku.
- You have to store a
.datfile locally. Keep in mind that heroku has an ephemeral file system, so I don’t think it’s supposed to be used for this type of thing.
In the end, I found this blog post with a solution in ruby and cloned the repo so that I could launch my own IP Geolocation service. What a pain in the butt!
Since this is a common problem, I was thinking the solution should be trivial, what am I missing? Is there another way? This seems like a perfect candidate for a heroku add-on.