language: ruby
bundler_args: --binstubs --jobs=3 --retry=3
cache: bundler
sudo: false
script: bin/rake
rvm:
  - 2.5.0
env:
  - RAILS_VERSION='~> 5.2.0'
  - RAILS_VERSION='~> 5.1.0'
  - RAILS_VERSION='5-1-stable'
  - RAILS_VERSION='5-2-stable'
matrix:
  include:
    - rvm: 2.2.3
      env: RAILS_VERSION='~> 5.1.0'
    - rvm: 2.4.4
      env: RAILS_VERSION='~> 4.2.10'
  fast_finish: true

language: ruby
bundler_args: --binstubs --jobs=3 --retry=3
cache: bundler
sudo: false
before_install:
  - gem update --system
  - gem install bundler
script: bin/rake
rvm:
  - 2.5.0
env:
  - RAILS_VERSION='~> 5.2.0'
  - RAILS_VERSION='~> 5.1.0'
  - RAILS_VERSION='5-1-stable'
  - RAILS_VERSION='5-2-stable'
matrix:
  include:
    - rvm: 2.2.3
      env: RAILS_VERSION='~> 5.1.0'
    - rvm: 2.4.4
      env: RAILS_VERSION='~> 4.2.10'
  fast_finish: true

Fix failing Travis CI setup
Fix failing Travis CI setup

The builds are failing due to a strange error where rake cannot find
other dependencies.

    bundler: failed to load command: rake
    LoadError: cannot load such file -- bundler/dep_proxy

It appears this is a known issue (travis-ci/travis-ci#9062) which links
to a Ruby Gem issue (rubygems/rubygems#2055).

This implements a hopefully simple fix which ensures bundler is updated
on the system, and that the installed version of Rails has the bundler
gem available.
