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

AssemblyShipmentSerializer super class mismatch issue #94

Open
RhysStansfield opened this issue Sep 4, 2014 · 6 comments
Open

AssemblyShipmentSerializer super class mismatch issue #94

RhysStansfield opened this issue Sep 4, 2014 · 6 comments

Comments

@RhysStansfield
Copy link

Running into a slightly annoying issue (2-3-stable) whereby the Spree::Wombat::AssemblyShipmentSerializer is regularly throwing a superclass mismatch error after changes are made in our app in development mode - issue comes from this line of code:

https://github.com/spree/spree-product-assembly/blob/2-3-stable/lib/spree_product_assembly/engine.rb#L14

Changing it to simply require it fixes the problem - I assume there was a reason to be load-ing it though in the first place, testing or some-such?

I also note that in the current master version of this Gem you've removed it entirely (not an option for us at the moment unfortunately as we can't move up to master spree without doing some serious hackery).

Long story short - can I open a PR removing that load jazz from 2-3-stable or will it cause devastation in ways I've not considered? Or other options/ideas?

Cheers!

Rhys

@JDutil
Copy link
Member

JDutil commented Sep 4, 2014

What is the error message & backtrace? This sounds like another Spring error... not an error with that code. You could try removing spring from your application to fix dev environment, but most people are just restarting server if it begins to act up until we figure out what the root cause is.

I'm not sure what the root cause is yet, but we have been seeing all sorts of weird errors as a result of Rails 4.1 using spring to autoload code in development now. For instance:
spree/spree#5104
jumph4x/durable_decorator#24

@forvalho
Copy link

forvalho commented Sep 5, 2014

I'm not sure why this is happenning either, and I'm sorry I can't come up with a reasonable explanation, but... It doesn't seem to me like it's (exclusively) related to Spring, as we are not even running it.

$ spring status
Spring is not running.

There's also a comment on the spree issue that you linked from a guy who is not using Spring either, but Zeus. In our case, we're using Spork.

@JDutil
Copy link
Member

JDutil commented Sep 5, 2014

Can you guys provide the error message & backtrace?

@forvalho
Copy link

forvalho commented Sep 6, 2014

Sorry, it took a while to happen again, but here it is:

TypeError - superclass mismatch for class AssemblyShipmentSerializer:
   () Users/francisco/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/spree-product-assembly-3cb32c61c44f/lib/serializers/spree/wombat/assembly_shipment_serializer.rb:3:in `<module:Wombat>'
   () Users/francisco/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/spree-product-assembly-3cb32c61c44f/lib/serializers/spree/wombat/assembly_shipment_serializer.rb:2:in `<module:Spree>'
   () Users/francisco/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/spree-product-assembly-3cb32c61c44f/lib/serializers/spree/wombat/assembly_shipment_serializer.rb:1:in `<top (required)>'
  activesupport (4.1.5) lib/active_support/dependencies.rb:241:in `block in load'
  activesupport (4.1.5) lib/active_support/dependencies.rb:232:in `load_dependency'
  activesupport (4.1.5) lib/active_support/dependencies.rb:241:in `load'
   () Users/francisco/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/spree-product-assembly-3cb32c61c44f/lib/spree_product_assembly/engine.rb:14:in `block in activate'
   () Users/francisco/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/spree-product-assembly-3cb32c61c44f/lib/spree_product_assembly/engine.rb:13:in `activate'
  activesupport (4.1.5) lib/active_support/callbacks.rb:438:in `block in make_lambda'
  activesupport (4.1.5) lib/active_support/callbacks.rb:184:in `block in simple'
  activesupport (4.1.5) lib/active_support/callbacks.rb:185:in `block in simple'
  activesupport (4.1.5) lib/active_support/callbacks.rb:185:in `block in simple'
  activesupport (4.1.5) lib/active_support/callbacks.rb:185:in `block in simple'
  activesupport (4.1.5) lib/active_support/callbacks.rb:185:in `block in simple'
  activesupport (4.1.5) lib/active_support/callbacks.rb:185:in `block in simple'
  activesupport (4.1.5) lib/active_support/callbacks.rb:185:in `block in simple'
  activesupport (4.1.5) lib/active_support/callbacks.rb:185:in `block in simple'
  activesupport (4.1.5) lib/active_support/callbacks.rb:185:in `block in simple'
  activesupport (4.1.5) lib/active_support/callbacks.rb:185:in `block in simple'
  activesupport (4.1.5) lib/active_support/callbacks.rb:185:in `block in simple'
  activesupport (4.1.5) lib/active_support/callbacks.rb:185:in `block in simple'
  activesupport (4.1.5) lib/active_support/callbacks.rb:185:in `block in simple'
  activesupport (4.1.5) lib/active_support/callbacks.rb:185:in `block in simple'
  activesupport (4.1.5) lib/active_support/callbacks.rb:86:in `run_callbacks'
  actionpack (4.1.5) lib/action_dispatch/middleware/reloader.rb:83:in `prepare!'
  actionpack (4.1.5) lib/action_dispatch/middleware/reloader.rb:71:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
  better_errors (1.1.0) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (1.1.0) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (1.1.0) lib/better_errors/middleware.rb:56:in `call'
  rack-contrib (1.1.0) lib/rack/contrib/response_headers.rb:17:in `call'
  meta_request (0.3.4) lib/meta_request/middlewares/headers.rb:16:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.1.5) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.1.5) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.1.5) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.1.5) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.1.5) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.1.5) lib/rails/rack/logger.rb:20:in `call'
  quiet_assets (1.0.3) lib/quiet_assets.rb:23:in `call_with_quiet_assets'
  actionpack (4.1.5) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
  rack (1.5.2) lib/rack/runtime.rb:17:in `call'
  activesupport (4.1.5) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/static.rb:64:in `call'
  rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
  railties (4.1.5) lib/rails/engine.rb:514:in `call'
  railties (4.1.5) lib/rails/application.rb:144:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  rack (1.5.2) lib/rack/content_length.rb:14:in `call'
  rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
  /Users/francisco/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
  /Users/francisco/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
  /Users/francisco/.rbenv/versions/2.1.1/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'

@realadeel
Copy link

I'm getting exactly the same issue. Any movement on this issue?

@zavan
Copy link

zavan commented May 4, 2017

Same error here.

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

5 participants