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

Zeitwerk LoadError after upgrading to 32d487f #173

Open
filippoliverani opened this issue Mar 24, 2022 · 1 comment
Open

Zeitwerk LoadError after upgrading to 32d487f #173

filippoliverani opened this issue Mar 24, 2022 · 1 comment

Comments

@filippoliverani
Copy link
Contributor

Ruby version: 3.1.1
Rails version: 6.1.4.7
Solidus version: 3.1.5

After upgrading the gem to rev 32d487f when running Avatax initializer:

Spree::Avatax::Config.configure  do |config|

I get this LoadError:

LoadError: Unable to autoload constant Spree::Avatax::Config, expected /usr/local/lib/ruby/gems/3.1.0/bundler/gems/solidus_avatax_certified-32d487f45097/lib/spree/avatax/config.rb to define it

@DanielePalombo It's probably related to this change
https://github.com/boomerdigital/solidus_avatax_certified/pull/172/files#diff-dab461c0e0e21d28bfcd91eb14a7ebbc04540b8f1d761853183ac80a77676c84R10

Do I have to update the initializer in some way to make it work?

@filippoliverani filippoliverani changed the title Zeitwerk LoadError after upgrading to 32d487f Zeitwerk LoadError after upgrading to 32d487f Mar 24, 2022
@rainerdema
Copy link

Until we fix the problem, a quick workaround would be to wrap the configuration in an after_initialize like this:

Rails.application.config.after_initialize do
  Spree::Avatax::Config.configure do |config|
   ...
  end
end

@filippoliverani, I'm sure you already found a workaround for that, but I'm leaving this comment to assist others who might encounter the same problem.

Let me know if you already have an idea on how we might proceed to fix this 👍

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

2 participants