Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Environment data not found in the schema" #988

Open
gisborne opened this issue Jan 21, 2025 · 0 comments
Open

"Environment data not found in the schema" #988

gisborne opened this issue Jan 21, 2025 · 0 comments

Comments

@gisborne
Copy link

I've somehow gotten into a state where parallel specs cause this:

rake aborted!
ActiveRecord::NoEnvironmentInSchemaError: 

Environment data not found in the schema. To resolve this issue, run: 

        bin/rails db:environment:set RAILS_ENV=test

It also reports some of the most recent specs have not been run, even though they have.

When I dig into the source of the error, the process that is throwing the exception sees an empty ar_internal_metadata table, although if I look in that table in the test database myself, the environment value is there before and after trying to run specs.

A similar issue was reported in Rails 5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant