ruby on rails - Google authentification error "no route match" -


i have problem, follow tutorial :https://richonrails.com/articles/google-authentication-in-ruby-on-rails.

i have done except rails g controller home show because have static_pages controller , home.html.erb

so in route.rb have replace line tutorial:

resource :home, only: [:show] root to: "home#show"

by

resource :static_pages, only: [:home] root to: 'static_pages#home'

but when click on link after i've launched server (localhost) have error:

no route matches [get] "/auth/google_oauth2"

do have idea problem? hope me.

thank in advance.

edit : route.rb code

rails.application.routes.draw    'sessions/create'   'sessions/destroy'   'sessions/new'   'users/new'    root             'static_pages#home'   'help'    => 'static_pages#help'   'about'   => 'static_pages#about'   'contact' => 'static_pages#contact'   'signup'  => 'users#new'      'login'   => 'sessions#new'   post   'login'   => 'sessions#create'   delete 'logout'  => 'sessions#destroy'    resources :users end googleauthexample::application.routes.draw   'auth/:provider/callback', to: 'sessions#create'   'auth/failure', to: redirect('/')   'signout', to: 'sessions#destroy', as: 'signout'    resources :sessions, only: [:create, :destroy]   resource :static_pages, only: [:home]    root to: 'static_pages#home' end 

it work! devise. dont forget install "mongoid" gem in order set devise (that took me lot of time determine mogoid missing).

thank all!


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -