我在heroku上有一个生产应用程序,它依赖于设计/ oauth来登录Facebook或Twitter。昨晚登录工作正常,但截至今天早上,我无法通过Twitter登录(Facebook工作正常。)
我在Heroku的开发和生产中都得到'gsub' for nil:NilClass
。
我昨天做了提交,但git reset --hard HEAD@{"number before yesterday"}
无法解决问题。
我不知道从哪里开始调试此问题。我应该在哪里看?
这是我的堆栈tace和捆绑的宝石
堆栈跟踪
Started GET "/users/auth/twitter" for 127.0.0.1 at 2013-04-23 11:06:13 -0400
NoMethodError (undefined method `gsub' for nil:NilClass):
/Users/umezo/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/cgi/util.rb:7:in `escape'
oauth (0.4.7) lib/oauth/tokens/request_token.rb:28:in `block in build_authorize_url'
oauth (0.4.7) lib/oauth/tokens/request_token.rb:28:in `each'
oauth (0.4.7) lib/oauth/tokens/request_token.rb:28:in `map'
oauth (0.4.7) lib/oauth/tokens/request_token.rb:28:in `build_authorize_url'
oauth (0.4.7) lib/oauth/tokens/request_token.rb:9:in `authorize_url'
omniauth-oauth (1.0.1) lib/omniauth/strategies/oauth.rb:36:in `request_phase'
omniauth-twitter (0.0.14) lib/omniauth/strategies/twitter.rb:63:in `request_phase'
omniauth (1.1.1) lib/omniauth/strategy.rb:207:in `request_call'
omniauth (1.1.1) lib/omniauth/strategy.rb:174:in `call!'
omniauth (1.1.1) lib/omniauth/strategy.rb:157:in `call'
warden (1.2.1) lib/warden/manager.rb:35:in `block in call'
warden (1.2.1) lib/warden/manager.rb:34:in `catch'
warden (1.2.1) lib/warden/manager.rb:34:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.3) lib/rack/etag.rb:23:in `call'
rack (1.4.3) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.3) lib/rack/session/abstract/id.rb:210:in `context'
rack (1.4.3) lib/rack/session/abstract/id.rb:205:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/cookies.rb:341:in `call'
activerecord (3.2.11) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.11) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `_run__2832114944232593679__call__887588005576904267__callbacks'
activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.11) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.11) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.11) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.11) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.11) lib/rails/rack/logger.rb:16:in `block in call'
activesupport (3.2.11) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.11) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.3) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.3) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.11) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.3) lib/rack/lock.rb:15:in `call'
actionpack (3.2.11) lib/action_dispatch/middleware/static.rb:62:in `call'
railties (3.2.11) lib/rails/engine.rb:479:in `call'
railties (3.2.11) lib/rails/application.rb:223:in `call'
rack (1.4.3) lib/rack/content_length.rb:14:in `call'
railties (3.2.11) lib/rails/rack/log_tailer.rb:17:in `call'
thin (1.5.0) lib/thin/connection.rb:81:in `block in pre_process'
thin (1.5.0) lib/thin/connection.rb:79:in `catch'
thin (1.5.0) lib/thin/connection.rb:79:in `pre_process'
thin (1.5.0) lib/thin/connection.rb:54:in `process'
thin (1.5.0) lib/thin/connection.rb:39:in `receive_data'
eventmachine (1.0.0) lib/eventmachine.rb:187:in `run_machine'
eventmachine (1.0.0) lib/eventmachine.rb:187:in `run'
thin (1.5.0) lib/thin/backends/base.rb:63:in `start'
thin (1.5.0) lib/thin/server.rb:159:in `start'
rack (1.4.3) lib/rack/handler/thin.rb:13:in `run'
rack (1.4.3) lib/rack/server.rb:268:in `start'
railties (3.2.11) lib/rails/commands/server.rb:70:in `start'
railties (3.2.11) lib/rails/commands.rb:55:in `block in <top (required)>'
railties (3.2.11) lib/rails/commands.rb:50:in `tap'
railties (3.2.11) lib/rails/commands.rb:50:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
Rendered /Users/umezo/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.9ms)
Rendered /Users/umezo/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.3ms)
Rendered /Users/umezo/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (18.4ms)
宝石
Using rake (10.0.4)
Using i18n (0.6.1)
Using multi_json (1.5.0)
Using activesupport (3.2.11)
Using builder (3.0.4)
Using activemodel (3.2.11)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.3)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.2.2)
Using actionpack (3.2.11)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.11)
Using arel (3.0.2)
Using tzinfo (0.3.35)
Using activerecord (3.2.11)
Using activerecord-reputation-system (2.0.0)
Using activeresource (3.2.11)
Using addressable (2.3.2)
Using ancestry (1.3.0)
Using annotate (2.5.0)
Using multi_xml (0.5.1)
Using httparty (0.9.0)
Using json (1.7.6)
Using nokogiri (1.5.6)
Using uuidtools (2.1.3)
Using aws-sdk (1.3.9)
Using bcrypt-ruby (3.0.1)
Using sass (3.2.5)
Using bootstrap-sass (2.2.2.0)
Using will_paginate (3.0.3)
Using bootstrap-will_paginate (0.0.9)
Using ffi (1.3.0)
Using childprocess (0.3.6)
Using websocket (1.0.6)
Using libwebsocket (0.1.7.1)
Using rubyzip (0.9.9)
Using selenium-webdriver (2.27.2)
Using xpath (0.1.4)
Using capybara (1.1.2)
Using chunky_png (1.2.7)
Using orm_adapter (0.4.0)
Using ckeditor (3.7.3)
Using cocaine (0.3.2)
Using coderay (1.0.8)
Using coffee-script-source (1.4.0)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using rdoc (3.12)
Using thor (0.16.0)
Using railties (3.2.11)
Using coffee-rails (3.2.2)
Using fssm (0.2.9)
Using compass (0.12.2)
Using compass-rails (1.0.3)
Using daemons (1.1.9)
Using dalli (2.6.2)
Using warden (1.2.1)
Using devise (2.2.0)
Using diff-lcs (1.1.3)
Using eventmachine (1.0.0)
Using factory_girl (4.1.0)
Using factory_girl_rails (4.1.0)
Using faker (1.1.2)
Using multipart-post (1.1.5)
Using faraday (0.8.4)
Using friendly_id (4.0.9)
Using growl (1.0.3)
Using listen (0.7.1)
Using lumberjack (1.0.2)
Using method_source (0.8.1)
Using slop (3.3.3)
Using pry (0.9.10)
Using guard (1.6.1)
Using guard-rspec (1.2.1)
Using spork (0.9.2)
Using sys-proctable (0.9.2)
Using guard-spork (1.2.0)
Using hashie (1.2.0)
Using httpauth (0.2.0)
Using jquery-rails (2.1.4)
Using jquery-ui-rails (4.0.2)
Using jwt (0.1.5)
Using oauth (0.4.7)
Using oauth2 (0.8.0)
Using omniauth (1.1.1)
Using omniauth-oauth2 (1.1.1)
Using omniauth-facebook (1.4.1)
Using omniauth-oauth (1.0.1)
Using omniauth-twitter (0.0.14)
Using paperclip (3.1.4)
Using pg (0.14.1)
Using bundler (1.2.1)
Using rails (3.2.11)
Using rb-fsevent (0.9.1)
Using rspec-core (2.11.1)
Using rspec-expectations (2.11.3)
Using rspec-mocks (2.11.3)
Using rspec (2.11.0)
Using rspec-rails (2.11.0)
Using sass-rails (3.2.5)
Using simple_form (2.0.4)
Using thin (1.5.0)
Using uglifier (1.3.0)
答案 0 :(得分:2)
在gem的GitHub回购页面上有一个未解决的问题。
答案 1 :(得分:0)
没关系,它再次工作......;)
我认为这意味着它与twitter有关,而不是我的应用程序。 但是,有关如何诊断此类问题的任何意见都将不胜感激。