简体   繁体   中英

rails error Bundler could not find compatible versions for gem gem “spree_backend”

I want to configure email setting in spree I add this gem according to this tutorial https://guides.spreecommerce.com/user/configuring_mail_methods.html

  gem 'spree_mail_settings', github: 'spree-contrib/spree_mail_settings', branch: 'master'

But running bundle install gives me the following error:

Bundler could not find compatible versions for gem "spree_backend":
  In snapshot (Gemfile.lock):
    spree_backend (= 3.0.7)

  In Gemfile:
    spree (~> 3.0.7) was resolved to 3.0.7, which depends on
      spree_backend (= 3.0.7)

    spree_mail_settings was resolved to 2.2.0, which depends on
      spree_backend (~> 3.1.0.beta)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Running bundle update gives me this:

Bundler could not find compatible versions for gem "spree_backend":
  In Gemfile:
    spree_mail_settings was resolved to 2.2.0, which depends on
      spree_backend (~> 3.1.0.beta)

Could not find gem 'spree_backend (~> 3.1.0.beta)', which is required by gem
'spree_mail_settings', in any of the sources.

in my gemfile I have:

gem 'spree', '~> 3.0.7'
gem 'spree_gateway', '~> 3.0.0'
gem 'spree_auth_devise', '~> 3.0.0'
gem 'spree_i18n', git: 'git://github.com/spree/spree_i18n.git', branch: '3-0-stable'
gem 'spree_mail_settings', github: 'spree-contrib/spree_mail_settings', branch: 'master'

I tried to write like this gem 'spree', '~> 3.1.0' but it didn't work

~> 3.0.7 is equivalent to >= 3.0.7 and <3.1

Rather than trying to tease apart what is and isn't compatible, I would install it like:

gem 'spree'
gem 'spree_gateway'
gem 'spree_auth_devise'
gem 'spree_i18n', git: 'git://github.com/spree/spree_i18n.git', branch: '3-    0-stable'
gem 'spree_mail_settings', github: 'spree-contrib/spree_mail_settings', branch: 'master'

then I'd bundle install and bundle update. I'd then check the gemfile.lock and see what the gems versioned themselves to. Hopefully it resolves appropriately.

Delete your Gemfile.lock file then run bundle install and bundle update . I'm not assure this options should work,just try it.

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