Rails 5, Rspec: Environment data not found in the schema

前端 未结 7 1205
南方客
南方客 2020-12-29 01:49

After upgrading a Rails app to Rails 5, running RSpec tests gives me the following error:

rails aborted!
ActiveRecord::NoEnvironmentInSchemaError: 

Environm         


        
7条回答
  •  醉话见心
    2020-12-29 02:39

    For me, this error was followed by a similar one asking for a migration.

    This did the trick: rails db:migrate RAILS_ENV=test

提交回复
热议问题