Circular dependency detected while autoloading constant
I got "Circular dependency detected while autoloading constant".
I removed config.autoload_paths += Dir["#{Rails.root}/app/api/*"] from application.rbthen it started to work again.
If anybody else had the same issue, it makes sense to update the README.md.
I am using Rails 4.0.1.
I'm having the same issue but do not have that file on my application.rb. what do you think the problem could be? I am using Rails 4.0.0.
I just re-typed my helper module and it started working may be it was a syntax error
which helper was it?
Same here, trying to figure it out now.
+1
+1. Same bug after updating to 4.1 from 4.0
Rails 4.1.1, Grape 0.8.0 My API class - TwitterAPI I got that error after edit file from api/ folder I changed this
ActiveSupport::Dependencies.explicitly_unloadable_constants << "TwitterAPI"
to this:
ActiveSupport::Dependencies.explicitly_unloadable_constants << "AppName::TwitterAPI"
where AppName - application module from application.rb, and now its OK
I just ran into the same issue locally after upgrading to Rails 4. I removed the Rails 3.x hack to reload the API and apply changes and it works fine again.
I don't think this is a grape issue per-se, so I am going to close. We definitely need to improve the reloading instructions documentation, which is https://github.com/intridea/grape/pull/658 which would be nice if someone could please finish.