language: ruby
sudo: false
cache: bundler
before_install:
  - gem install bundler -v '< 2'
rvm:
  - 2.2.10
  - 2.3.8
  - 2.4.6
  - 2.5.5
  - 2.6.3
  - ruby-head
gemfile:
  - gemfiles/rails_4_2.gemfile
  - gemfiles/rails_5_0.gemfile
  - gemfiles/rails_master.gemfile
  - Gemfile
matrix:
  exclude:
    - rvm: 2.6.3
      gemfile: gemfiles/rails_4_2.gemfile
    - rvm: 2.6.3
      gemfile: gemfiles/rails_5_0.gemfile
    - rvm: 2.5.5
      gemfile: gemfiles/rails_4_2.gemfile
    - rvm: 2.5.5
      gemfile: gemfiles/rails_5_0.gemfile
  allow_failures:
    - rvm: ruby-head
    - gemfile: gemfiles/rails_master.gemfile
  fast_finish: true
notifications:
  email: false
  irc:
    on_success: change
    on_failure: always
    channels:
      - "irc.freenode.org#rails-contrib"

language: ruby
sudo: false
cache: bundler
before_install:
  - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
  - gem install bundler -v '< 2'
rvm:
  - 2.2.10
  - 2.3.8
  - 2.4.6
  - 2.5.5
  - 2.6.3
  - ruby-head
gemfile:
  - gemfiles/rails_4_2.gemfile
  - gemfiles/rails_5_0.gemfile
  - gemfiles/rails_master.gemfile
  - Gemfile
matrix:
  exclude:
    - rvm: 2.6.3
      gemfile: gemfiles/rails_4_2.gemfile
    - rvm: 2.6.3
      gemfile: gemfiles/rails_5_0.gemfile
    - rvm: 2.5.5
      gemfile: gemfiles/rails_4_2.gemfile
    - rvm: 2.5.5
      gemfile: gemfiles/rails_5_0.gemfile
  allow_failures:
    - rvm: ruby-head
    - gemfile: gemfiles/rails_master.gemfile
  fast_finish: true
notifications:
  email: false
  irc:
    on_success: change
    on_failure: always
    channels:
      - "irc.freenode.org#rails-contrib"

Make sure bundler 2 is not installed
Make sure bundler 2 is not installed

or the CI fails on ruby 2.4.6
