After upgrading a Rails app to Rails 5, running RSpec tests gives me the following error:
rails aborted!
ActiveRecord::NoEnvironmentInSchemaError:
Environm
For me, I had to do a mixture of things:
bin/rails db:environment:set RAILS_ENV=test
bin/rails db:migrate RAILS_ENV=test
This would make things work, and then I had to review my migrations, I was adding a null:false into a relationship and that added a bug, the migration was cancelled and didn't finish