1

just by including the gem in my Gemfile:

gem 'omniauth-google-oauth2'

I get the following error:

21:20:05 web.1  | started with pid 20590
21:20:14 web.1  | /Users/user/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:74:in `require': cannot load such file -- omniauth/google/oauth2 (LoadError)
21:20:14 web.1  |   from /Users/user/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:74:in `rescue in block in require'
21:20:14 web.1  |   from /Users/user/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:62:in `block in require'
21:20:14 web.1  |   from /Users/user/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `each'
21:20:14 web.1  |   from /Users/user/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `require'
21:20:14 web.1  |   from /Users/user/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler.rb:128:in `require'
21:20:14 web.1  |   from /Users/user/Sites/WISDOM/code/git/wisdom/config/application.rb:7:in `<top (required)>'
21:20:14 web.1  |   from /Users/user/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.11/lib/rails/commands.rb:53:in `require'
21:20:14 web.1  |   from /Users/user/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.11/lib/rails/commands.rb:53:in `block in <top (required)>'
21:20:14 web.1  |   from /Users/user/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.11/lib/rails/commands.rb:50:in `tap'
21:20:14 web.1  |   from /Users/user/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.11/lib/rails/commands.rb:50:in `<top (required)>'
21:20:14 web.1  |   from script/rails:6:in `require'
21:20:14 web.1  |   from script/rails:6:in `<main>'
21:20:14 web.1  | exited with code 1
21:20:14 system | sending SIGTERM to all processes
SIGTERM received

I use the following gems:

oauth2 (0.9.2)
rails (3.2.11)
devise (3.0.0)

I have seen this issue https://github.com/zquestz/omniauth-google-oauth2/pull/32 but upgrading devise didn't help in this case.

Any idea what could be the issue?

4

1 回答 1

4

我将 Oauth2 与 Devise 一起使用,并通过以下方式在我的 gemfile 中包含omniauth-google-oauth2:

宝石'omniauth-google-oauth2',git:' https ://github.com/zquestz/omniauth-google-oauth2.git '

于 2013-07-25T11:42:26.777 回答