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

Getting 'uninitialized constant ActionDispatch::Routing::Mapper::Scope (NameError)' with rails 3 #930

Closed
betosalvador opened this issue Jul 24, 2017 · 5 comments

Comments

@betosalvador
Copy link

betosalvador commented Jul 24, 2017

Hello.

I'm trying to solve this problem, but I have no success.

I'm using rails 3.2 with the lastest version of devise_token_auth and after the installation, when I try to run the server, I'm getting this error:

betosalvador@ubuntu-work:~/hubsystem$ rails s
=> Booting WEBrick
=> Rails 3.2.18 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/betosalvador/.rvm/gems/ruby-2.1.5/gems/devise_token_auth-0.1.42/lib/devise_token_auth/rails/routes.rb:43:in `block in mount_devise_token_auth_for': uninitialized constant ActionDispatch::Routing::Mapper::Scope (NameError)
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/devise_token_auth-0.1.42/lib/devise_token_auth/rails/routes.rb:104:in `unnest_namespace'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/devise_token_auth-0.1.42/lib/devise_token_auth/rails/routes.rb:35:in `mount_devise_token_auth_for'
  from /home/betosalvador/hubsystem/config/routes.rb:12:in `block (3 levels) in <top (required)>'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/actionpack-3.2.18/lib/action_dispatch/routing/mapper.rb:617:in `scope'
  from /home/betosalvador/hubsystem/config/routes.rb:11:in `block (2 levels) in <top (required)>'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/actionpack-3.2.18/lib/action_dispatch/routing/mapper.rb:683:in `block in namespace'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/actionpack-3.2.18/lib/action_dispatch/routing/mapper.rb:617:in `scope'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/actionpack-3.2.18/lib/action_dispatch/routing/mapper.rb:683:in `namespace'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/actionpack-3.2.18/lib/action_dispatch/routing/mapper.rb:1235:in `namespace'
  from /home/betosalvador/hubsystem/config/routes.rb:10:in `block in <top (required)>'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:285:in `instance_exec'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:285:in `eval_block'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:263:in `draw'
  from /home/betosalvador/hubsystem/config/routes.rb:5:in `<top (required)>'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/application/routes_reloader.rb:40:in `each'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/application/routes_reloader.rb:40:in `load_paths'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/application/routes_reloader.rb:16:in `reload!'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/application/routes_reloader.rb:26:in `block in updater'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/activesupport-3.2.18/lib/active_support/file_update_checker.rb:78:in `call'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/activesupport-3.2.18/lib/active_support/file_update_checker.rb:78:in `execute'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/application/routes_reloader.rb:27:in `updater'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/application/finisher.rb:66:in `block in <module:Finisher>'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/initializable.rb:30:in `instance_exec'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/initializable.rb:30:in `run'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/initializable.rb:55:in `block in run_initializers'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/initializable.rb:54:in `each'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/initializable.rb:54:in `run_initializers'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/application.rb:136:in `initialize!'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in `method_missing'
  from /home/betosalvador/hubsystem/config/environment.rb:8:in `<top (required)>'
  from /home/betosalvador/hubsystem/config.ru:3:in `block in <main>'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize'
  from /home/betosalvador/hubsystem/config.ru:in `new'
  from /home/betosalvador/hubsystem/config.ru:in `<main>'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/rack-1.4.7/lib/rack/builder.rb:40:in `eval'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/rack-1.4.7/lib/rack/builder.rb:40:in `parse_file'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/rack-1.4.7/lib/rack/server.rb:200:in `app'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/commands/server.rb:46:in `app'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/rack-1.4.7/lib/rack/server.rb:304:in `wrapped_app'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/rack-1.4.7/lib/rack/server.rb:254:in `start'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/commands/server.rb:70:in `start'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/commands.rb:55:in `block in <top (required)>'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/commands.rb:50:in `tap'
  from /home/betosalvador/.rvm/gems/ruby-2.1.5/gems/railties-3.2.18/lib/rails/commands.rb:50:in `<top (required)>'
  from script/rails:6:in `require'
  from script/rails:6:in `<main>'

Can anyone give me a help, please!

Thanks in advance

@betosalvador
Copy link
Author

Hello, guys

Is there some branch/fork that supports rails 3?

Thanks in advance!

@betosalvador
Copy link
Author

Can, anyone give me at least a tip of how I can solve this problem?

Please, I really need this.

@lynndylanhurley
Copy link
Owner

lynndylanhurley commented Aug 2, 2017

The very first version of this gem was built against rails 4.1. It won't be possible to add rails 3 support without a significant amount of work.

@betosalvador
Copy link
Author

Thanks for response. I really would like to use this gem in my project :(

@zachfeldman
Copy link
Contributor

Possible workaround has been supplied, going to close this one our for now.

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

3 participants