Installationedit

Install the Rubygem for the latest Elasticsearch version by using the following command:

gem install elasticsearch

Or add the elasticsearch Ruby gem to your Gemfile:

gem 'elasticsearch'

You can install the Ruby gem for a specific Elasticsearch version by using the following command:

gem install elasticsearch -v 7.0.0

Or you can add a specific version of Elasticsearch to your Gemfile:

gem 'elasticsearch', '~> 7.0'

Elasticsearch and Ruby Version Compatibilityedit

The Elasticsearch client is compatible with Ruby 1.9 and higher.

The client’s API is compatible with Elasticsearch API versions from 0.90 till current, just use a release matching major version of Elasticsearch.

Gem Version Elasticsearch Version

0.90

0.90

1.x

1.x

2.x

2.x

5.x

5.x

6.x

6.x

7.x

7.x

master

master