我目前在我的rails应用程序中使用Devise.我想用我的api添加Devise Token Auth进行身份验证.当我尝试使用设置devise_token_auth时
rails g devise_token_auth:install User auth
rake db:migrate
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
~/workspace (devise_token_auth) $ rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
ArgumentError: Invalid route name, already in use: 'new_user_session'
You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as …Run Code Online (Sandbox Code Playgroud)