使用“omniauth-oauth2”捆绑安装错误

运行bundle install我收到以下错误(完整跟踪: http : //pastebin.com/Vp4nHc2p ):

 Bundler could not find compatible versions for gem "omniauth-oauth2": In Gemfile: omniauth-facebook (~> 1.2.0) ruby depends on omniauth-oauth2 (~> 1.0.0) ruby omniauth-github (~> 1.0.1) ruby depends on omniauth-oauth2 (1.1.1) 

要查看我的Gemfile: http ://pastebin.com/vMcHDHa8

知道怎么解决吗?

嗨,您可能需要安装omniauth facebook和github版本,它们接受相同版本的omniauth-oath2 ..

看起来你需要更新两个gem……然后他们都会接受omniauth-oath2版本1.1

查看依赖关系:

https://rubygems.org/gems/omniauth-facebook

https://rubygems.org/gems/omniauth-github

只需用gemfile替换omniauth-github和facebook gems的链接:

 gem "omniauth-github", "~> 1.0.3" gem "omniauth-facebook", "~> 1.4.1" 

然后运行bundle update omniauth-gihub ,然后bundle update omniauth-facebook

你应该没问题。

注意:我假设1.1和1.1.0是相同的版本,如果不是你可能需要通过读出omniauth-facebook和github的依赖关系来咨询rubygems以找到3个兼容的gems