Circular dependency detected while autoloading constant
To understand this, first we need to know how rails autoload works.
First, rails provide a mechanism to let user does not to require every dependency in application files.
If we call any unloaded constant in rails, rails will try to find the file in load path and require the file by
lookup the file in load paths.
For example, a constant call
Product, will lookup the product.rb file in app/models, app/controllers, lib/ and other load paths.
Rails achieve this by extend the ruby