Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular dependency detected while autoloading constant Api #106

Closed
joannatdl opened this issue Jan 8, 2015 · 2 comments
Closed

Circular dependency detected while autoloading constant Api #106

joannatdl opened this issue Jan 8, 2015 · 2 comments

Comments

@joannatdl
Copy link

I'm using this gem together with the module ng-token-auth in my Ionic mobile app (which bases on angular).
After logging in, if I reload the page, a request auth/validate_token will be sent. I get a 'Circular dependency detected while autoloading constant Api' on that.
I'm also using the gem grape for building the API, which could also be the source of the problem.

This is my routes.rb file (devise is also included because I'm using it in my Rails app which contains the API):

Rails.application.routes.draw do
  devise_for :users, controllers: { omniauth_callbacks: 'omniauth_callbacks'}
  namespace :api do
    mount_devise_token_auth_for 'User', at: '/v1/auth'
    mount API => '/'
    mount GrapeSwaggerRails::Engine => '/doc'
  end
  (...)
end

There is no useful info in the server logs. How can I solve this problem?
Thank you!

@lynndylanhurley
Copy link
Owner

Can you try upgrading to version 0.1.31.beta8? This looks like it may be related to an issue with namespace that was just fixed in that version.

@joannatdl
Copy link
Author

that worked! thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants