0

我已经构建了一个带有 facebook 和 twitter 集成的 rails 应用程序,在开发中一切正常,但在进入生产环境后(我已将 fb 上的 url 和 twitter 设置更改为我的站点 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'
4

1 回答 1

0

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

于 2012-10-23T12:37:18.113 回答