sudo: false
cache: bundler
language: ruby

rvm:
  - 2.1.10
  - 2.2.8
  - 2.3.5
  - 2.4.2
  - ruby-head
  - jruby-9.1.13.0

matrix:
  allow_failures:
    - rvm: ruby-head
  fast_finish: true

addons:
  code_climate:
    repo_token: ee08f267b6e437b1e68aeb024266ebaa8bf4ed474490e145ce8ad113e117d9b1

before_install: gem update --remote bundler
script: bundle exec rake

sudo: false
cache: bundler
language: ruby

rvm:
  - 2.1.10
  - 2.2.8
  - 2.3.5
  - 2.4.2
  - ruby-head
  - jruby-9.1.13.0

matrix:
  allow_failures:
    - rvm: ruby-head
  fast_finish: true

addons:
  code_climate:
    repo_token: ee08f267b6e437b1e68aeb024266ebaa8bf4ed474490e145ce8ad113e117d9b1

before_install:
  - gem update --system 2.6.14
  - gem install bundler -v 1.15.4

script: bundle exec rake

Install working versions of rubygems and bundler
Install working versions of rubygems and bundler

That's how Rails fixed the Travis/Rubygems/Bundler issue:
https://github.com/rails/rails/pull/31541
