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

wrong constant name user #784

Closed
sanchobouillant opened this issue Dec 4, 2016 · 1 comment
Closed

wrong constant name user #784

sanchobouillant opened this issue Dec 4, 2016 · 1 comment

Comments

@sanchobouillant
Copy link

Hi,

I installed devise_token_auth on a fresh new rails 5 app.

I added "gem 'devise_token_auth'" then i used "rails g devise_token_auth:install User".

Now the command "rake db:migrate give an error:

/usr/local/bundle/gems/activesupport-5.0.0.1/lib/active_support/inflector/methods.rb:268:in `const_get': wrong constant name user (NameError)

The problem seem to be in my routes.rb

Rails.application.routes.draw do

  scope module: 'api' do
    namespace :v1 do
      mount_devise_token_auth_for 'user', at: 'auth'

      resources :users
    end
  end

end

Any ideas ?

@sanchobouillant
Copy link
Author

My bad, 'user' should be 'User'

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

1 participant