简体   繁体   中英

Rails: Bundle cannot resolve dependencies

I am using various omniauth gems and after I added PayPal I get this error when running bundle or bundle update :

Bundler could not find compatible versions for gem "omniauth-oauth2":
  In Gemfile:
omniauth-dribbble (~> 0.0.1) x86-mingw32 was resolved to 0.0.1, which
depends on
      omniauth-oauth2 (~> 1.1) x86-mingw32

omniauth-dribbble (~> 0.0.1) x86-mingw32 was resolved to 0.0.1, which
depends on
      omniauth-oauth2 (~> 1.1) x86-mingw32

omniauth-facebook (~> 4.0) x86-mingw32 was resolved to 4.0.0, which depends
on
      omniauth-oauth2 (~> 1.2) x86-mingw32

omniauth-google-oauth2 (~> 0.4.1) x86-mingw32 was resolved to 0.4.1, which
depends on
      omniauth-oauth2 (>= 1.3.1) x86-mingw32

    omniauth-paypal (~> 1.2) x86-mingw32 was resolved to 1.2, which depends on
      omniauth-oauth2 (~> 1.1.0) x86-mingw32

Is there a way to circumvent this and still use the Omniauth PayPal Gem?

EDIT:

The PayPal Gem does conflict with the Google Omniauth solution. I cannot have them both. Why?

You can't have them both because paypal depends on omniauth 1.1 and google-oath2 depends on omniauth 1.3. You should wait until paypal uses omniauth 1.3.

First make sure you are using the more recent version of the gems and bundle update. If this does not work.

Then you can fork the gems. Change the dependency for "omniauth-oauth2" and refer to your forked gems. This way both gems refer to the same dependent gem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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