language: ruby
rvm:
  - 1.9.3
  - 2.0.0
  - 2.1
  - 2.2

before_script:
  - cd spec/dummy
  - bundle exec rake db:migrate db:test:prepare
  - cd ../../

gemfile:
  - gemfiles/3.2.gemfile
  - gemfiles/4.0.gemfile
  - gemfiles/4.1.gemfile
  - gemfiles/4.2.gemfile


language: ruby
rvm:
  - 1.9.3
  - 2.0.0
  - 2.1
  - 2.2

before_script:
  - cd spec/dummy
  - bundle exec rake db:migrate db:test:prepare
  - cd ../../

gemfile:
  - gemfiles/3.2.gemfile
  - gemfiles/4.0.gemfile
  - gemfiles/4.1.gemfile
  - gemfiles/4.2.gemfile

matrix:
  exclude:
    - rvm: 2.2
      gemfile: gemfiles/3.2.gemfile
    - rvm: 2.2
      gemfile: gemfiles/4.0.gemfile

Exclude Rails 3.2 and 4.0 to run using ruby 2.2
Exclude Rails 3.2 and 4.0 to run using ruby 2.2

At this time Rails 3.2 do not support Ruby 2.2, I got the same error on
the Rails 4.0.

https://github.com/rails/rails/pull/18160
