After upgrading a Rails app to Rails 5, running RSpec tests gives me the following error:
rails aborted! ActiveRecord::NoEnvironmentInSchemaError: Environm
I had to drop my database for tests and create it again:
psql
DROP DATABASE your_db_name_test;
bundle exec rake db:create RAILS_ENV=test
After that the warning bin/rails db:environment:set RAILS_ENV=test disappeared.
bin/rails db:environment:set RAILS_ENV=test