oauth没有在生产中激活auth / facebook

时间:2012-10-23 07:06:46

标签: facebook ruby-on-rails-3 facebook-graph-api oauth unicorn

我已经构建了一个兼容facebook和twitter的rails应用程序,一切都在开发上工作正常但是在转向生产之后(我已经将fb和twitter设置上的url更改为我的网站url subdomain.domain.com)oauth是不会触发。它指向独角兽玉米文件名并给出无效的URI错误。我已粘贴下面的错误。任何帮助都非常感谢...

URI::InvalidURIError (the scheme http does not accept registry part: unicorn_txt_browser (or bad hostname?)):
  /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/uri/generic.rb:213:in `initialize'
  /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/uri/http.rb:84:in `initialize'
  /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/uri/common.rb:214:in `new'
  /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/uri/common.rb:214:in `parse'
  /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/uri/common.rb:747:in `parse'
  omniauth (1.1.1) lib/omniauth/strategy.rb:404:in `full_host'
  omniauth-oauth2 (1.0.3) lib/omniauth/strategies/oauth2.rb:34:in `callback_url'
  omniauth-facebook (1.4.0) lib/omniauth/strategies/facebook.rb:106:in `callback_url'
  omniauth-oauth2 (1.0.3) lib/omniauth/strategies/oauth2.rb:46:in `request_phase'
  omniauth-facebook (1.4.0) lib/omniauth/strategies/facebook.rb:94: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'
  omniauth (1.1.1) lib/omniauth/builder.rb:48:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.1) lib/rack/etag.rb:23:in `call'
  rack (1.4.1) lib/rack/conditionalget.rb:25:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.5) lib/action_dispatch/middleware/flash.rb:238:in `call'

1 个答案:

答案 0 :(得分:0)

我遇到了问题,在我的nginx conf文件中,代理传递是“unicorn_txt_browser”,其中不允许使用下划线,将其更改为“unicorn-txt-browser”解决了问题...