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
- 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
-
ActiveRecord::Migration.check_pending!
is gone. What they do not mention is that its been replaced withActiveRecord::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!
Written by Brian Stolz
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#