-
Notifications
You must be signed in to change notification settings - Fork 247
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
NoMethodError exception with sprockets-rails 3.5.0 #524
Comments
also seeing this in our CI |
With the release of sprockets-rails 3.5.0, our local test suite breaks with ``` NoMethodError: undefined method `deprecator' for Sprockets::Rails:Module /home/circleci/solidus/vendor/bundle/ruby/3.2.0/gems/sprockets-rails-3.5.0/lib/sprockets/railtie.rb:129:in `block in <class:Railtie>' ``` This should fix that by explicitly requiring the `Sprockets::Rails.deprecator` in both `lib/sprockets/rails.rb` and `lib/sprockets/railtie.rb`. Should fix rails#524
sprockets-rails 3.5.0 breaks our test suite. See rails/sprockets-rails#524 and rails/sprockets-rails#525
Started happening in our github actions during zeitwerk:check - just updated to Rails 7.1.3.4 |
I m having the same problem. By chance I had another project where I did not get this exception after upgrading to 3.5.0. All projects use dartsass. On one project, sprockets-rails 3.5.0 worked. By experimentation, I found that I do not get this exception if I list sprockets-rails before dartsass-sprockets in the Gemfile as such:
|
Fix from @ccasabona seems to have worked for us, too.
We didn't have Looks like we have 3.4 instead of 3.5 now, that's probably what fixed it! So the fix in |
To be clear, listing sprockets-rails before dartsass-sprockets or spockets works when using sprockets-rails 3.5.0. If you're using 3.4.2, it does not appear to matter. |
Sounds good. I didn't specify a version and got what bundler gave me. |
For one of my apps, the order in the Gemfile is as suggested by @ccasabona and yet it was failing to boot. What fixes it is not following part of the installation instructions, specifically leave out the # Asset handling & front-end concerns
gem 'sprockets-rails', :require => 'sprockets/railtie'
gem 'shakapacker', '8.0.0'
gem 'sassc-rails'
gem 'breakpoint'
gem 'autoprefixer-rails'
gem 'terser'
gem 'csso-rails'
gem 'turbo-rails' Looking at the file/directory structure I can see why having |
This commit pins `sprockets-rails` version to 3.4.2 until rails/sprockets-rails#524 is fixed. Refer to rails#52038
With the release of sprockets-rails 3.5.0, our local test suite breaks with ``` NoMethodError: undefined method `deprecator' for Sprockets::Rails:Module /home/circleci/solidus/vendor/bundle/ruby/3.2.0/gems/sprockets-rails-3.5.0/lib/sprockets/railtie.rb:129:in `block in <class:Railtie>' ``` This should fix that by explicitly requiring the `Sprockets::Rails.deprecator` in both `lib/sprockets/rails.rb` and `lib/sprockets/railtie.rb`. Should fix rails#524
Looking into it. |
Thank you for your work in releasing 3.5.1. This version is working on our Rails 7.1.3.4 and 7.2.beta2 projects. I was able to go back to not listing sprockets-rails in the gemfile as before. |
This commit pins `sprockets-rails` version to 3.4.2 until rails/sprockets-rails#524 is fixed. Refer to rails#52038
This commit pins `sprockets-rails` version to 3.4.2 until rails/sprockets-rails#524 is fixed. Refer to rails#52038
This commit pins `sprockets-rails` version to 3.4.2 until rails/sprockets-rails#524 is fixed. Refer to rails#52038
Hello,
After upgrading to
3.5.0
, I'm seeing a new exception in a rails7.1.3.4
app withconfig.load_defaults 6.1
.sprockets-rails/lib/sprockets/railtie.rb
Lines 128 to 130 in 5f6d88d
There's something happening with the load order because if I add the new
deprecator
method beforeRails.application.initialize!
, then no exception is raised.environment.rb
I'll continue to look into this, but wanted to post in case there's something obvious to someone who understands this better.
Thanks!
Full Backtrace
The text was updated successfully, but these errors were encountered: