mercredi 19 août 2015

Could not find matching strategy for :google_apps. You may need to install an additional gem (such as omniauth-google_apps)

Hello I have installed the below gem. I had this gem installed before http://ift.tt/1WFE3DF but it doesn't work anymore so i uninstalled it and installed the below gem.

gem "omniauth-google-oauth2"

I ran bundle install without any errors.

When i rake routes in terminal. I receive this error.

/Users/joseph/.rvm/gems/ruby-2.1.5/gems/omniauth-1.1.3/lib/omniauth/builder.rb:39:in `rescue in provider': Could not find matching strategy for :google_apps. You may need to install an additional gem (such as omniauth-google_apps). (LoadError)

application.yml

OAUTH_CLIENT_ID: "<I pasted my client id here>"
OAUTH_CLIENT_SECRET: "<I pasted my client secret here>"
APPLICATION_CONFIG_SECRET_TOKEN: "<I pasted my token here"

initializers/omniauth.rb

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :google_apps#, OpenID::Store::Filesystem.new('/tmp')
  provider :google_oauth2,
    ['I pasted google client id here'],
    ['i pasted secret here'],
    {name: "google_login", approval_prompt: ''}
end

Anyone have any clues on how to fix it?

Aucun commentaire:

Enregistrer un commentaire