6

将 OmniAuth gem 更新到 1.1 后出现此错误:

Started GET "/users/auth/facebook" for 127.0.0.1 at 2012-04-13 11:31:37 +0300

NoMethodError (undefined method `info' for nil:NilClass):
  omniauth (1.1.0) lib/omniauth/strategy.rb:151:in `log'
  omniauth (1.1.0) lib/omniauth/strategy.rb:190:in `request_call'
  omniauth (1.1.0) lib/omniauth/strategy.rb:174:in `call!'
  omniauth (1.1.0) lib/omniauth/strategy.rb:157:in `call'
  omniauth (1.1.0) lib/omniauth/builder.rb:48:in `call'

我正在使用omniauth 通过facebook 授权用户。进行了捆绑更新,现在单击“登录 Facebook”时出现此错误。

另一个问题 - 有没有办法回滚捆绑 gem 更新?也许每次都创建一个新的 rvm 集?

恢复到 OmniAuth 1.0.2 解决了这个问题。

以下是上次更新的 gem 的完整日志:

Using rake (0.9.2.2) 
Using i18n (0.6.0) 
Using multi_json (1.0.4) 
Installing activesupport (3.2.2) 
Using builder (3.0.0) 
Installing activemodel (3.2.2) 
Using erubis (2.7.0) 
Using journey (1.0.3) 
Using rack (1.4.1) 
Installing rack-cache (1.2) 
Using rack-test (0.6.1) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.1.2) 
Installing actionpack (3.2.2) 
Installing mime-types (1.18) 
Using polyglot (0.3.3) 
Using treetop (1.4.10) 
Installing mail (2.4.4) 
Installing actionmailer (3.2.2) 
Using arel (3.0.2) 
Installing tzinfo (0.3.33) 
Installing activerecord (3.2.2) 
Using activerecord-import (0.2.9) 
Installing activeresource (3.2.2) 
Using acts_as_list (0.1.5) 
Using addressable (2.2.7) 
Using bcrypt-ruby (3.0.1) 
Using bundler (1.0.10) 
Using cocaine (0.2.1) 
Installing coffee-script-source (1.3.1) 
Using execjs (1.3.0) 
Using coffee-script (2.2.0) 
Using rack-ssl (1.3.2) 
Installing json (1.6.6) with native extensions 
Using rdoc (3.12) 
Using thor (0.14.6) 
Installing railties (3.2.2) 
Using coffee-rails (3.2.2) 
Installing orm_adapter (0.0.7) 
Using warden (1.1.1) 
Using devise (2.0.4) 
Using multipart-post (1.1.5) 
Using faraday (0.7.6) 
Using hashie (1.2.0) 
Installing launchy (2.1.0) 
Installing netrc (0.7.1) 
Using rest-client (1.6.7) 
Installing rubyzip (0.9.7) 
Installing heroku (2.24.1) 
Installing jquery-rails (2.0.2) 
Using kaminari (0.13.0) 
Installing koala (1.4.0) 
Installing systemu (2.5.0) 
Using macaddr (1.5.0) 
Installing multi_xml (0.4.2) 
Using mysql (2.8.1) 
Using nifty-generators (0.4.6) 
Using oa-core (0.3.2) 
Using oauth (0.4.5) 
Using oauth2 (0.5.2) 
Using oa-oauth (0.3.2) 
Installing oauth-plugin (0.4.0) 
Installing omniauth (1.1.0) 
Using omniauth-oauth2 (1.0.0) 
Using omniauth-facebook (1.2.0) 
Using paperclip (2.7.0) 
Installing rails (3.2.2) 
Using sass (3.1.15) 
Installing sass-rails (3.2.5) 
Installing simple_form (2.0.1) 
Using sqlite3 (1.3.5) 
Using sqlite3-ruby (1.3.3) 
Installing uglifier (1.2.4) 
Using uuid (2.3.5) 
4

1 回答 1

12

我有同样的问题,我的工作是在初始化程序(omniauth.rb)中创建一个文件并添加:

  OmniAuth.config.logger = Logger.new(STDOUT)
  OmniAuth.logger.progname = "omniauth"
于 2012-04-15T09:56:43.477 回答