How to resolve issues related to loading modules/classes that are still in memory?

Asked

Viewed 12 times

0

Round and a half my Sidekiq gets the error shown below, and soon after is played again to run queue. After a while, the error automatically disappears and the queue continues to run normally.

ArgumentError: A copy of StateMachines::RemittanceStateMachine has been removed from the module tree but is still active!

I would like to have a better understanding of the problem so that I can avoid it in the future.

  • I also realize in some cases that the error is another, but for some reason the error ends up hidden and this message is presented instead of the real problem.

  • 1

    See if that is your case: http://stackoverflow.com/questions/29636334/a-copy-of-xxx-has-been-removed-from-the-module-tree-but-is-still-active

  • @Alextakitani your reference helped me a lot, the solution I found was to change the directory of app/models/state_machines for app/state_machines. Seems to be an autoload loading problem in changing the file.

  • Awesome, just change something in a file name_state_machine.rb that the problem happens.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.