Bundler找不到与宝石"rails"兼容的版本.|在Gemfile中:rails(〜> 6.1.0)x64-mingw3 [英] Bundler could not find compatible versions for gem "rails" | In Gemfile: rails (~> 6.1.0) x64-mingw3
问题描述
我正在使用 Spree Commerce 开发一个新的 Ruby on Rails 项目,并且在运行 bundle install
时遇到以下错误:
I'm developing a new Ruby on Rails project with Spree Commerce and while running bundle install
I'm getting the following error:
Bundler could not find compatible versions for gem "rails":
rails (~> 6.1.0) x64-mingw32
spree (~> 4.1) x64-mingw32 was resolved to 4.2.0.beta, which depends on
spree_core (= 4.2.0.beta) was resolved to 4.2.0.beta, which depends on
rails (~> 6.0.0)
我正在遵循 Spree Commerce文档进行安装.
我在 Windows 10 上,使用 Ruby 2.7.2 ,捆绑程序2.2.3 和 Rails 6.1.0 ,因此,我的Gemfile包括:
I'm on Windows 10, using Ruby 2.7.2, Bundler 2.2.3 and Rails 6.1.0 and with that, my Gemfile includes:
gem 'spree', '~> 4.1'
gem 'spree_auth_devise', '~> 4.2'
gem 'spree_gateway', '~> 3.9'
我尝试删除了狂欢宝石,然后运行默认的Gemfile,它成功安装了依赖项,但是在添加这些宝石时抛出了以上错误.
I tried to remove the spree gems and then run the default Gemfile and it installs the dependencies successfully but throws the above error when I add those gems.
我尝试了以下所有方法,但无济于事:
- 已删除Gemfile.lock
-
捆绑更新
-
捆绑安装--full-index
- 已检查的环境变量
- 重新安装的Rails项目
推荐答案
Spree 不支持Ruby on Rails 6.1尚未实现.这是针对Spree 4.3计划的.
Spree doesn't support Ruby on Rails 6.1 yet. That is planned for Spree 4.3.
因此,您唯一的选择是将Ruby on Rails降级为〜>.6.0.3
.
Therefore the only option for you is to downgrade Ruby on Rails to ~> 6.0.3
.
这篇关于Bundler找不到与宝石"rails"兼容的版本.|在Gemfile中:rails(〜> 6.1.0)x64-mingw3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!