Comments (3)
I don't think there is a solution for this problem. If you loaded file.rb
and that code is trying to execute code that depends on the database schema, there is no other workaround than upgrading the database schema.
from rails.
A common solution to this problem is first to ship the database schema, then, when the database is ready and migrate, deploy the code that uses that schema
from rails.
Let me add for extra clarification that Zeitwerk is not really related to this (which @rafaelfranca is already saying).
The problem is that the file is being evaluated, and it cannot be evaluated. The application is the one doing that by means of having eager loading enabled. How is eager loading implemented is not really relevant to this situation.
You are asking the framework to eager load, and the code cannot be eager loaded.
from rails.
Related Issues (20)
- Blog sample failing on windows 11 HOT 4
- Rails 7.2: Memoization of the ActiveJob adapter class happens too early HOT 2
- Rails 7.1 raises exception while trying to increment counter cache on model using CPK HOT 1
- Rails 7.2: Parsing tests with prism makes it impossible to run spec-style tests by line number
- Ability to split locals magic comment into multiple lines
- `EarlyHintsRequestTest#test_when_early_hints_is_set_in_the_env_link_headers_are_sent` fails with since https://github.com/rack/rack/pull/1831 HOT 2
- Command `rails devcontainer` failed - missing templates HOT 2
- `.pluck` with multiple sql fragment arguments using `min` incorrectly casts types when using PostgreSQL HOT 2
- accepts_nested_attributes_for doesn't account for records that are marked for destruction when validating uniqueness HOT 2
- Composite key relations raise when calling `include?` HOT 1
- rails restart doesn't work with puma HOT 3
- Missing documentation for "fixture" method
- [Rails 7.1.3.2] Invalid CSRF Token when submitting a form with data-turbo="false" when Turbo Drive is enabled HOT 2
- [ActiveRecord::Encryption] ignores key_provider in with_encryption_context HOT 4
- [Rails 6.1] Rails 6.1 vulerable to CVE-2024-34341 (trix and actiontext) HOT 1
- The password field is ignored when I use fetch or require #52010 HOT 1
- [Guides Enhancement] Add Search using Algolia or similar
- Database references and ActiveRecord references not match HOT 3
- Would be nice to be able to specify a table to use for `references` columns when generating a migration HOT 3
- Inconsistent charset case in redirect content type HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rails.