language: ruby
sudo: false
cache: bundler
gemfile:
  - gemfiles/rails_4.2.gemfile
  - gemfiles/rails_5.0.gemfile
  - gemfiles/rails_5.1.gemfile
  - gemfiles/rails_5.2.gemfile
  - Gemfile
rvm:
  - '2.2.10'
  - '2.3.7'
  - '2.4.4'
  - '2.5.1'
  - jruby-9.1.15.0
matrix:
  include:
    - rvm: '2.3.7'
      gemfile: 'gemfiles/rails_4.0.gemfile'
    - rvm: '2.3.7'
      gemfile: 'gemfiles/rails_4.1.gemfile'
    - rvm: '2.4.4'
      gemfile: gemfiles/rails_head.gemfile
  allow_failures:
    - gemfile: gemfiles/rails_head.gemfile

language: ruby
sudo: false
cache: bundler
gemfile:
  - gemfiles/rails_4.2.gemfile
  - gemfiles/rails_5.0.gemfile
  - gemfiles/rails_5.1.gemfile
  - gemfiles/rails_5.2.gemfile
  - Gemfile
before_install:
  - gem update --system
  - gem install bundler
rvm:
  - '2.2.10'
  - '2.3.7'
  - '2.4.4'
  - '2.5.1'
  - jruby-9.1.15.0
matrix:
  include:
    - rvm: '2.3.7'
      gemfile: 'gemfiles/rails_4.0.gemfile'
    - rvm: '2.3.7'
      gemfile: 'gemfiles/rails_4.1.gemfile'
    - rvm: '2.4.4'
      gemfile: gemfiles/rails_head.gemfile
  allow_failures:
    - gemfile: gemfiles/rails_head.gemfile

Update Rubygems and bundler before building
Update Rubygems and bundler before building

Fixes https://github.com/travis-ci/travis-ci/issues/8978.