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
Cannot install any extensions #11909
Comments
Hi @nicknetender - this is due to the fact that Ruby 3 made some changes to how the autoloader works, and the extension hasn't been updated. The update itself is quite simple, here's a pattern that you can follow: spree-contrib/spree_braintree_vzero@fe07cd2 |
Thank you sir. I've been playing with some of the extensions, it seems some/most of them (after making the suggested change) fail with: Did a grep through the Spree source and couldn't find any class by that name. Our friend Google says it does show up in the Solidus codebase though. 🤔 Do you have any idea whether these modules ever worked, or were designed to work with Spree? I think what's happening is really strange. I was really hoping this would be nice and smooth 💔 |
Hi @nicknetender could you send a link to the exact extension? |
Most if not of them fail with either the error mentioned above, or are outdated (require core < 3.something or 4.0) and if updating the dependency version (and hoping to resolve any issues upon load & test) they eventually fail with the same error. Here are a bunch of extensions we've tried, please excuse me for dumping this code brick. Some are linked directly from the Extensions section on the website.
|
@nicknetender if you could point me to a specific one with this problem, I'll be happy to help :) I've just tried updating https://github.com/spree-contrib/spree_print_invoice/compare/chore/update_rails_7?expand=1 and it boots fine with just this change |
@rafalcymerys Sorry to bump this older comment. I'm working on spree_reviews to Rails 7.1 and getting this error when pushing to Heroku: Zeitwerk::NameError: expected file /tmp/build_209785a3/vendor/bundle/ruby/3.3.0/bundler/gems/spree_reviews-0bbcaa96f2ac/app/overrides/add_reviews_after_product_properties.rb to define constant AddReviewsAfterProductProperties, but didn't (Zeitwerk::NameError) I'm fairly new to Rails, coming from a PHP background, so trying to get up-to-speed on the workings and this is one that I'm not quite there with yet. |
Hi @bpqr - this is caused by recent changes in Rails autoloader - it now expects that every .rb file will define a constant with a related name. Deface overrides unfortunately don't follow that structure. |
@rafalcymerys Thank you! All working now! |
Hello @bpqr in my project. before deploy i check zeitwerk until all will be good - bin/rails zeitwerk:check and every error i write to initializer file - config/initializers/zietwerk.rb |
Context
I am trying to install some extensions into a fresh Spree 4.6 installation. All extensions fail with an error.
Expected Behavior
Spree should run/boot/work/start with any extension installed according to the documentation, but it does not.
Actual Behavior
The application fails to boot at all.
Possible Fix
Update Spree documentation to clarify that either
Steps to Reproduce
Your Environment
I have tried installing all extensions, each and every one fail with a similar error saying it can't find some class/constant.
The text was updated successfully, but these errors were encountered: