-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Errors running in Production mode config.eager_load = true #6038
Comments
solidus (4.4.2) |
Alright, I've managed to track some of this down: This does not happen in our sandbox, because the sandbox uses Devise, and devises loads all the application routes before eager loading. A quick fix could be
In an initializer. This is less than ideal though, as it slows the boot process down. We're actively looking at how to improve this. |
Rather than implementing routing proxies ourselves, we can use what Rails offers. Fixes solidusio#6038
Solidus Version:4.4.2
To Reproduce
Deployed to VPS via capistrano. Ruby 3.2.2 Rails 7.2.2.1
Navigate to admin/orders - error
NameError (undefined local variable or method `spree' for #<SolidusLegacyPromotions::Orders::Index::Component:0x00007f75d1a0b380
navigate to admin/products - error
NameError (undefined local variable or method `spree' for #<SolidusAdmin::Products::Index::Component:0x00007f75ca9ad7a0
With eager loading off pages load.
The text was updated successfully, but these errors were encountered: