rvm:
  - 2.2.9
  - 2.3.8
  - 2.4.5
  - 2.5.3
  - ruby-head

addons:
  firefox: latest

# whitelist
branches:
  only:
    - master

gemfile:
  - gemfiles/rails_5_2.gemfile
  - gemfiles/rails_5_1.gemfile
  - gemfiles/rails_5_0.gemfile
  - gemfiles/rails_4_2.gemfile

matrix:
  fast_finish: true
  allow_failures:
    - rvm: ruby-head
  exclude:
    - rvm: ruby-head
      gemfile: gemfiles/rails_4_2.gemfile

before_install:
  - gem update --system
  - gem update --remote bundler
  - bin/install_geckodriver.sh

before_script: geckodriver -V

rvm:
  - 2.2.9
  - 2.3.8
  - 2.4.5
  - 2.5.3
  - ruby-head

addons:
  firefox: latest

# whitelist
branches:
  only:
    - master

gemfile:
  - gemfiles/rails_5_2.gemfile
  - gemfiles/rails_5_1.gemfile
  - gemfiles/rails_5_0.gemfile
  - gemfiles/rails_4_2.gemfile

matrix:
  fast_finish: true
  allow_failures:
    - rvm: ruby-head
  exclude:
    - rvm: ruby-head
      gemfile: gemfiles/rails_4_2.gemfile

before_install:
  - gem update --remote bundler
  - bin/install_geckodriver.sh

before_script: geckodriver -V

Fix a build error for Ruby 2.2 matrix on Travis CI
Fix a build error for Ruby 2.2 matrix on Travis CI

## Summary

Fix a build error for Ruby 2.2 matrix on Travis CI.

## Details

This PR fixes the following build error.

```console
$ gem update --system
Updating rubygems-update
Fetching: rubygems-update-3.0.1.gem (100%)
ERROR:  Error installing rubygems-update:
        rubygems-update requires Ruby version >= 2.3.0.
ERROR:  While executing gem ... (NoMethodError)
    undefined method `version' for nil:NilClass
The command "gem update --system" failed and exited with 1 during .
```

https://travis-ci.org/cucumber/cucumber-rails/jobs/471780986#L480-L487

## Motivation and Context

RubyGems 3.0.1 requires Ruby 2.3.0 or higher.
https://github.com/rubygems/rubygems/blob/v3.0.1/rubygems-update.gemspec#L32
