Problem with `zeitwerk` after update to version 3.4.0
afuno opened this issue · comments
There seems to be something wrong with zeitwerk
in release 3.4.0. The application started crashing instantly after updating the gem version from 3.3.0 to 3.4.0.
Failure/Error: require File.expand_path("../config/environment", __dir__)
NameError:
uninitialized constant Actor::ServiceActor
include ServiceActor::Base
^^^^^^^^^^^^
# /usr/local/bundle/gems/service_actor-3.4.0/lib/service_actor.rb:7:in `<class:Actor>'
# /usr/local/bundle/gems/service_actor-3.4.0/lib/service_actor.rb:6:in `<main>'
The application code, especially that associated with Actor, has not changed.
Now I'm trying to figure out what's wrong.
I still couldn't figure out what was wrong. But the problem is exactly in the changes that are in 3.4.0.
@sunny Can you check this issue please? I'm pretty sure it's because of zeitwerk
, which was introduced in 3.4.0.
All my services are inherited from this class:
class ApplicationService
include ServiceActor::Base
end
Since the problem is inside the library, this option also does not work:
class ApplicationService < Actor
end
Fixed in v3.4.1. This affected apps that required service_actor/base
instead of service_actor
. Sorry for that!