首页 > 解决方案 > Bundler 找不到 gem "omniauth" 的兼容版本

问题描述

我试图在我的应用程序中实现条带omniauth,但也使用google omniauth。两种宝石都依赖于宝石omniauth,但在不同的版本中,有人知道如何解决吗?

尝试捆绑时出现的错误:

    Bundler could not find compatible versions for gem "omniauth":
  In Gemfile:
    omniauth-google-oauth2 (>= 1.0.0) was resolved to 1.0.0, which depends on
      omniauth (~> 2.0)

    omniauth-stripe-connect was resolved to 2.9.0, which depends on
      omniauth (~> 1.0)

标签: ruby-on-railsrubyrubygems

解决方案


如果可以将omniauth-google-oauth2降级到0.8.2,它可以在我刚刚尝试过的同一个Gemfile中与omniauth-stripe-connect 2.10.1一起使用并使其正常工作:

Using omniauth 1.9.1
Using omniauth-oauth2 1.7.1 
Using omniauth-google-oauth2 0.8.2 
Using omniauth-stripe-connect 2.10.1

推荐阅读