routes with devise and devise_token_Auth not working
<p>I am not using the Rails API gem but I am trying to build an api in Rails.  I am using the devise gem and the <a href="https://github.com/lynndylanhurley/devise_token_auth" rel="nofollow">devise_token_auth gem</a>.  I just ran the line:</p>

<pre><code>rails g devise_token_auth:install FacilityUser auth
</code></pre>

<p>The generate command adbove worked but now my server won't start.  The problem is with my routes.rb file.</p>

<pre><code>Rails.application.routes.draw do

  devise_for :facility_users, ActiveAdmin::Devise.config

  devise_for :users, controllers: {registrations: "users/registrations", sessions: "users/sessions", passwords: "users/passwords"}, skip: [:sessions, :registrations]

  root 'landings#index'
  mount_devise_token_auth_for 'FacilityUser', at: 'auth'

end
</code></pre>

<p>When my route file is as above, I get the following error in my logs when I try to start the server:</p>

<pre><code>davids-MacBook-Pro:waynefacility davidmurray$ rails s
=&gt; Booting WEBrick
=&gt; Rails 4.1.4 application starting in development on http://0.0.0.0:3000
=&gt; Run `rails server -h` for more startup options
=&gt; Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=&gt; Ctrl-C to shutdown server
Exiting
/Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/route_set.rb:430:in `add_route': Invalid route name, already in use: 'new_facility_user_session'  (ArgumentError)
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 explained here: 
http://guides.rubyonrails.org/routing.html#restricting-the-routes-created
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1489:in `add_route'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1466:in `decomposed_match'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1464:in `block in decomposed_match'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1362:in `block (2 levels) in member'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:757:in `scope'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1362:in `block in member'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1594:in `with_scope_level'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1358:in `member'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1464:in `decomposed_match'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1447:in `block in match'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1437:in `each'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1437:in `match'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:630:in `map_method'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:591:in `get'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/bundler/gems/devise-69bee06ceee6/lib/devise/rails/routes.rb:377:in `block in devise_session'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1141:in `block in resource'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1605:in `block (2 levels) in resource_scope'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:757:in `scope'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1605:in `block in resource_scope'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1594:in `with_scope_level'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1604:in `resource_scope'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:1140:in `resource'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/bundler/gems/devise-69bee06ceee6/lib/devise/rails/routes.rb:376:in `devise_session'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/bundler/gems/devise-69bee06ceee6/lib/devise/rails/routes.rb:266:in `block (4 levels) in devise_for'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/bundler/gems/devise-69bee06ceee6/lib/devise/rails/routes.rb:266:in `each'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/bundler/gems/devise-69bee06ceee6/lib/devise/rails/routes.rb:266:in `block (3 levels) in devise_for'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/bundler/gems/devise-69bee06ceee6/lib/devise/rails/routes.rb:470:in `with_devise_exclusive_scope'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/bundler/gems/devise-69bee06ceee6/lib/devise/rails/routes.rb:265:in `block (2 levels) in devise_for'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/bundler/gems/devise-69bee06ceee6/lib/devise/rails/routes.rb:368:in `block in devise_scope'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:881:in `block in constraints'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:757:in `scope'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/mapper.rb:881:in `constraints'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/bundler/gems/devise-69bee06ceee6/lib/devise/rails/routes.rb:367:in `devise_scope'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/bundler/gems/devise-69bee06ceee6/lib/devise/rails/routes.rb:264:in `block in devise_for'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/bundler/gems/devise-69bee06ceee6/lib/devise/rails/routes.rb:240:in `each'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/bundler/gems/devise-69bee06ceee6/lib/devise/rails/routes.rb:240:in `devise_for'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/devise_token_auth-0.1.37/lib/devise_token_auth/rails/routes.rb:25:in `mount_devise_token_auth_for'
    from /Users/davidmurray/projects/waynefacility/config/routes.rb:14:in `block in &lt;top (required)&gt;'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/route_set.rb:337:in `instance_exec'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/route_set.rb:337:in `eval_block'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/route_set.rb:315:in `draw'
    from /Users/davidmurray/projects/waynefacility/config/routes.rb:1:in `&lt;top (required)&gt;'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `load'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `block in load'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in `load_dependency'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `load'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:40:in `each'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:40:in `load_paths'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:16:in `reload!'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:26:in `block in updater'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/activesupport-4.1.4/lib/active_support/file_update_checker.rb:75:in `call'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/activesupport-4.1.4/lib/active_support/file_update_checker.rb:75:in `execute'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:27:in `updater'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/finisher.rb:71:in `block in &lt;module:Finisher&gt;'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `run'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `each'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `call'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application.rb:300:in `initialize!'
    from /Users/davidmurray/projects/waynefacility/config/environment.rb:5:in `&lt;top (required)&gt;'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `block in require'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in `load_dependency'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
    from /Users/davidmurray/projects/waynefacility/config.ru:3:in `block in &lt;main&gt;'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
    from /Users/davidmurray/projects/waynefacility/config.ru:in `new'
    from /Users/davidmurray/projects/waynefacility/config.ru:in `&lt;main&gt;'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `eval'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `new_from_string'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/builder.rb:40:in `parse_file'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/server.rb:277:in `build_app_and_options_from_config'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/server.rb:199:in `app'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands/server.rb:50:in `app'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/server.rb:314:in `wrapped_app'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands/server.rb:130:in `log_to_stdout'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands/server.rb:67:in `start'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:81:in `block in server'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:76:in `tap'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:76:in `server'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands.rb:17:in `&lt;top (required)&gt;'
    from bin/rails:4:in `require'
    from bin/rails:4:in `&lt;main&gt;'
</code></pre>

<p>If I change the order of routes so that <code>mount_devise_token_auth_for 'FacilityUser', at: 'auth'</code> is the first line, then I get the following error:</p>

<pre><code>davids-MacBook-Pro:waynefacility davidmurray$ rails s
=&gt; Booting WEBrick
=&gt; Rails 4.1.4 application starting in development on http://0.0.0.0:3000
=&gt; Run `rails server -h` for more startup options
=&gt; Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=&gt; Ctrl-C to shutdown server
Exiting
/Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/devise_token_auth-0.1.37/lib/devise_token_auth/rails/routes.rb:40:in `block in mount_devise_token_auth_for': uninitialized constant ActionDispatch::Routing::Mapper::Scope (NameError)
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/devise_token_auth-0.1.37/lib/devise_token_auth/rails/routes.rb:86:in `unnest_namespace'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/devise_token_auth-0.1.37/lib/devise_token_auth/rails/routes.rb:32:in `mount_devise_token_auth_for'
    from /Users/davidmurray/projects/waynefacility/config/routes.rb:2:in `block in &lt;top (required)&gt;'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/route_set.rb:337:in `instance_exec'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/route_set.rb:337:in `eval_block'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/actionpack-4.1.4/lib/action_dispatch/routing/route_set.rb:315:in `draw'
    from /Users/davidmurray/projects/waynefacility/config/routes.rb:1:in `&lt;top (required)&gt;'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:40:in `each'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:40:in `load_paths'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:16:in `reload!'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:26:in `block in updater'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/activesupport-4.1.4/lib/active_support/file_update_checker.rb:75:in `call'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/activesupport-4.1.4/lib/active_support/file_update_checker.rb:75:in `execute'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:27:in `updater'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application/finisher.rb:71:in `block in &lt;module:Finisher&gt;'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `run'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `each'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `call'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
    from /Users/davidmurray/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/application.rb:300:in `initialize!'
    from /Users/davidmurray/projects/waynefacility/config/environment.rb:5:in `&lt;top (required)&gt;'
    from /Users/davidmurray/projects/waynefacility/config.ru:3:in `block in &lt;main&gt;'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
    from /Users/davidmurray/projects/waynefacility/config.ru:in `new'
    from /Users/davidmurray/projects/waynefacility/config.ru:in `&lt;main&gt;'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `eval'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `new_from_string'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/builder.rb:40:in `parse_file'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/server.rb:277:in `build_app_and_options_from_config'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/server.rb:199:in `app'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands/server.rb:50:in `app'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/rack-1.5.5/lib/rack/server.rb:314:in `wrapped_app'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands/server.rb:130:in `log_to_stdout'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands/server.rb:67:in `start'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:81:in `block in server'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:76:in `tap'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:76:in `server'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /Users/davidmurray/.rvm/gems/ruby-2.2.0/gems/railties-4.1.4/lib/rails/commands.rb:17:in `&lt;top (required)&gt;'
    from bin/rails:4:in `require'
    from bin/rails:4:in `&lt;main&gt;'
</code></pre>

<p>I tried commenting out a bunch of the routes so all i have is:</p>

<pre><code>mount_devise_token_auth_for 'FacilityUser', at: 'auth'
root 'landings#index'
</code></pre>

<p>but then i still get the same <code>block in mount_devise_token_auth_for': uninitialized constant ActionDispatch::Routing::Mapper::Scope (NameError)</code> error.</p>

<p>How do I fix this?</p>