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

undefined local variable or method root_path #854

Closed
Morpheu5 opened this issue Jun 23, 2016 · 6 comments
Closed

undefined local variable or method root_path #854

Morpheu5 opened this issue Jun 23, 2016 · 6 comments

Comments

@Morpheu5
Copy link

Morpheu5 commented Jun 23, 2016

I'm getting the same as #821 when in api_only mode, and the following

#<ActionView::Template::Error: undefined local variable or method `root_path' for #<#<Class:0x007fc9342dd340>:0x007fc9390285f0> Did you mean? font_path>

when I turn api_only to false. I generated the app with --api so initial conditions may be different from those of the OP in #821.

@tute
Copy link
Contributor

tute commented Jun 23, 2016

Can you show your routes file, please?

@Morpheu5
Copy link
Author

Sure, sorry.

Rails.application.routes.draw do
  use_doorkeeper
  resources :presets
  resources :users
  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end

@tute
Copy link
Contributor

tute commented Jun 23, 2016

You need to define a root path. See http://guides.rubyonrails.org/routing.html#using-root.

@tute
Copy link
Contributor

tute commented Jun 23, 2016

That's where the application goes when you visit /.

@Morpheu5
Copy link
Author

Ah, yes… I keep tripping over the fact that I'm making an API and Doorkeeper has a web interface. It would be really nice if we could disable it. I'd like to keep my API minimal and develop a front-end to manage it, including managing Doorkeeper.

@tute
Copy link
Contributor

tute commented Jun 23, 2016

It would be really nice if we could disable it

I'm not against this feature. Thanks for reporting!

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