// readme

GeoIP2

This gem provides binding of libmaxminddb.

This binding does not traverse all elements in lookup result by default. So you can get the element you want fast such as city name, country name or etc.

Supported Ruby versions

See workflows

Build requirements

Need ruby.h to build this extension, so you must install it before build this extension.

Debian GNU Linux / Ubuntu:

$ sudo apt install -y build-essential automake autoconf libtool pkgconf

CentOS:

$ sudo yum groupinstall -y "Development Tools"

By default, the build downloads the libmaxminddb source from GitHub, so it needs network access. To build without network access, use libmaxminddb installed on the system.

Installation

Add this line to your application’s Gemfile:

gem 'geoip2_c'

And then execute:

$ bundle

Or install it yourself as:

$ gem install geoip2_c

Using libmaxminddb installed on the system

By default, the installation downloads the source of libmaxminddb from…