1
votes

I'm following this tutorial: https://github.com/plataformatec/devise/wiki/OmniAuth%3A-Overview

My configs are:

Gemfile:

gem 'devise', '1.5'
gem 'omniauth-facebook'
gem 'omniauth-google-oauth2'

devise.rb:

require 'omniauth-google-oauth2'
config.omniauth :google_oauth2, "APP_ID", "APP_SECRET", { access_type: "offline", approval_prompt: "" }

require "omniauth-facebook"
config.omniauth :facebook, "APP-ID", "APP-Secret"

But when I start server I get this error:

/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.12/lib/active_support/dependencies.rb:242:in `require': no such file to load -- omniauth-google_oauth2 (LoadError)

It works with Facebook but not with Google Oauth2 gem.

PS: If I remove the "config.omniauth :google_oauth2" line the server starts normally. So I think it's something with this line.

Any idea?

1
Are you requiring the gem at the top of your devise.rb? - janders223
Yes, I solved the problem by updating Devise from 1.5 to 1.5.3 - Jirico

1 Answers

1
votes

Solved the problem by updating Devise from 1.5 to 1.5.3