【问题标题】:Bundler could not find compatible versions for gem "omniauth"Bundler 找不到 gem "omniauth" 的兼容版本
【发布时间】:2021-06-16 20:28:50
【问题描述】:

我试图在我的应用程序中实现条带omniauth,但也使用google omniauth。两个 gem 都依赖 gem 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)

【问题讨论】:

  • 如果可以将omniauth-google-oauth2 降级为0.8.2,它可以在我刚刚尝试过的同一个Gemfile 中使用omniauth-stripe-connect 2.10.1 并使其正常工作:使用omniauth 1.9 .1 使用omniauth-oauth2 1.7.1 使用omniauth-google-oauth2 0.8.2 使用omniauth-stripe-connect 2.10.1
  • @sel_space 谢谢,效果很好!

标签: ruby-on-rails ruby rubygems


【解决方案1】:

如果可以将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

【讨论】:

    猜你喜欢
    • 2011-10-31
    • 2017-07-17
    • 2018-02-09
    • 2014-05-26
    • 2014-03-14
    • 2013-03-13
    • 2019-05-07
    • 2016-02-17
    • 2013-03-12
    相关资源
    最近更新 更多