https://luciuschoi.gitbooks.io/exploring_devise/content/devise_omniauth/omniauth-twitter.html
http://sourcey.com/rails-4-omniauth-using-devise-with-twitter-facebook-and-linkedin/
http://destiny738.tistory.com/544
2015년 12월 15일 화요일
Routing Error uninitialized constant Users
Routing Error uninitialized constant 는 연관 클래스 파일의 위치가 잘못된 경우 발생하게 된다.
I am a rails newbie... I am trying to set up Sign in with facebook for a demo app. I am using OmniAuth and following this tutorial
I get this error when redirecting to fB:
Environment
My routes.rb looks like this:
devise.rb contains:
And OmniAuthController contains: i.e. app/controllers/omniauth_callbacks_controller.rb
The model User.rb contains:
Trace:
Started GET "/users/auth/facebook" for 127.0.0.1 at 2012-11-23 22:39:32 -0800 (facebook) Callback phase initiated.
Started GET "/users/auth/facebook/callback?
| ||||
mv
to
or change
to
| |||||
|
I believe that part is messing up:
Little test, for you:
put in your view:
and follow it with click, it also gives very same error...
I believe you should use something like (what is mentioned in wiki you linked above):
And wrap passthru method to delegate action to appropriate private/protected method depending on params[:provider] value
| ||||
피드 구독하기:
글 (Atom)
Users::OmniauthCallbacksController
then it needs to be inapp/controllers/users/omniauth_callbacks_controller.rb
. If you don't want nested folders for your controllers then simply name your controllerclass OmniauthCallbacksController < Devise::OmniauthCallbacksController
– Ashitaka Nov 24 '12 at 2:06users/omniauth_callbacks
. Either you remove theusers
part or you have to put your controller inside ausers
folder. – Ashitaka Nov 24 '12 at 15:13