Last Updated: February 25, 2016
·
1.473K
· tecnobrat

Two Rails 4.1 Upgrade Tips for Rspec and TravisCI

I just upgraded a number of projects to Rails 4.1. We are an rspec shop that uses TravisCI for Continuous Integration, so this mostly relates to those two implementations

  1. Travis no longer creates the DB on rails 4.1 projects, you need to do rake db:create in the before_script section in your .travis.yml
  2. ActiveRecord::Migration.check_pending! is gone. What they do not mention is that its been replaced with ActiveRecord::Migration.maintain_test_schema!. So add that to your spechelper file. rake db:test:prepare is now a NOOP as it is handled by `maintaintest_schema!`

Hope this helps someone else!