Name Clash with Top Level constant when autoloading with Rails
问题 I'm having a class Dog in app/models/dog.rb and another class Services::My::Deeply::Nested::Dog in app/services/my/deeply/nested/dog.rb . Now in Services::My (app/services/my.rb), I have a reference to one of the following (no need to distinguish, since the behaviour is exaclty the same in all situations): Deeply::Nested::Dog Services::My::Deeply::Nested::Dog ::Services::My::Deeply::Nested::Dog No matter which of the above I choose, I always get the following error message: services/my.rb: