简体   繁体   English

Rails omniauth-facebook为“ https://graph.facebook.com”使用的未定义方法“ path”:字符串

[英]Rails omniauth-facebook undefined method `path' for “https://graph.facebook.com”:String

I'm using the omniauth-facebook gem and when going to /auth/facebook I'm getting: 我正在使用omniauth-facebook gem,当转到/auth/facebook我得到:

undefined method `path' for "https://graph.facebook.com":String

and it's driving me nuts. 这让我发疯。

config/initializers/omniauth.rb config / initializers / omniauth.rb

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :facebook, [xxx], [xxx]
end

config/routes.rb config / routes.rb

match 'auth/:provider/callback', to: 'sessions#create'
match 'auth/failure', to: redirect('/')

I'm using 1.9.2 我正在使用1.9.2

Full stack trace: 完整堆栈跟踪:

faraday (0.8.4) lib/faraday/connection.rb:191:in `url_prefix='
faraday (0.8.4) lib/faraday/connection.rb:40:in `initialize'
faraday (0.8.4) lib/faraday.rb:11:in `new'
faraday (0.8.4) lib/faraday.rb:11:in `new'
oauth2 (0.8.0) lib/oauth2/client.rb:51:in `connection'
oauth2 (0.8.0) lib/oauth2/client.rb:63:in `authorize_url'
oauth2 (0.8.0) lib/oauth2/strategy/auth_code.rb:18:in `authorize_url'
omniauth-oauth2 (1.1.1) lib/omniauth/strategies/oauth2.rb:48:in `request_phase'
omniauth-facebook (1.4.1) 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'

Any help would be ridiculously appreciated. 任何帮助将是可笑的。

我已经通过将faraday gem降级到0.7.6版来解决此问题

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

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