rails_admin: Circular dependency detected while autoloading constant
Hi,
I have a rails 4 project, with mongoid that mounts an grape api:
mount MyProject::API => '/'
When accessing <site>/admin
I get the following exception:
RuntimeError (Circular dependency detected while autoloading constant Api):
When I remove the /app/api folder from autoload path all seems to work correctly (except the api of course)
Can you please give me some pointers for this issue?
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 26 (11 by maintainers)
Commits related to this issue
- Fix the autoloading error (circular dependency) Solution found at: https://github.com/sferik/rails_admin/issues/1697 Signed-off-by: Siddharth Kannan <kannan.siddharth12@gmail.com> — committed to icyflame/erp-rails by icyflame 9 years ago
- Fix the autoloading error (circular dependency) Solution found at: https://github.com/sferik/rails_admin/issues/1697 Signed-off-by: Siddharth Kannan <kannan.siddharth12@gmail.com> — committed to icyflame/erp-rails by icyflame 9 years ago
@steverob ok, explicitly whitelisting my models in
config/initializers/rails_admin.rb
seems to solve this issue (I should have tried @balauru’s advice first):