mollie / spree-mollie-gateway

Mollie payments for Spree Commerce.
https://www.mollie.com
16 stars 23 forks source link

uninitialized constant Spree::CheckoutController (NameError) #103

Open uaru opened 2 years ago

uaru commented 2 years ago

Fresh Spree project.

Added tp Gemfile

gem 'spree_mollie_gateway'

then run

bundle exec rails g spree_mollie_gateway:install

The result is below:

/Users/uaru/.rvm/gems/ruby-3.0.3/gems/spree_mollie_gateway-4.0.1/app/controllers/spree/checkout_controller_decorator.rb:38:in `<module:Spree>': uninitialized constant Spree::CheckoutController (NameError)
Did you mean?  Spree::CheckoutControllerDecorator
        from /Users/uaru/.rvm/gems/ruby-3.0.3/gems/spree_mollie_gateway-4.0.1/app/controllers/spree/checkout_controller_decorator.rb:1:in `<main>'
        from /Users/uaru/.rvm/gems/ruby-3.0.3/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from /Users/uaru/.rvm/gems/ruby-3.0.3/gems/bootsnap-1.10.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from /Users/uaru/.rvm/gems/ruby-3.0.3/gems/zeitwerk-2.5.3/lib/zeitwerk/kernel.rb:27:in `require'
        from /Users/uaru/.rvm/gems/ruby-3.0.3/gems/spree_mollie_gateway-4.0.1/app/controllers/spree/checkout_controller_decorator.rb:23:in `<module:Spree>'

It look similar to the previous issue #83, but this time it is not decorator..

GillesB1 commented 6 months ago

Encountering the same issue, also with the 'spree_mollie_gateway' gem in a (relatively fresh) Spree project, but with Spree::Api::V1::ShipmentsController.

NameError: uninitialized constant Spree::Api::V1::ShipmentsController (NameError)

Spree::Api::V1::ShipmentsController.prepend(Spree::Api::V1::ShipmentsControllerDecorator)
              ^^^^^^^^^^^^^^^^^^^^^
Did you mean?  Spree::ShipmentDecorator

Any thoughts on the matter would be greatly appreciated.