简体   繁体   English

使用Google Oauth2的Omniauth会出现加载错误

[英]Omniauth with Google Oauth2 gives a loading error

just by including the gem in my Gemfile: 只需将gem包含在我的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. 我已经看到了这个问题https://github.com/zquestz/omniauth-google-oauth2/pull/32但在这种情况下升级设计没有帮助。

Any idea what could be the issue? 知道可能是什么问题吗?

I use Oauth2 with Devise and include omniauth-google-oauth2 in the following way in my gemfile: 我将Oauth2与Devise一起使用,并在我的gemfile中以下列方式包含omniauth-google-oauth2:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM