[英]Ruby rails error: Bundler could not find compatible versions for gem "bundler":
Bundler could not find compatible versions for gem "bundler": Bundler 找不到 gem "bundle" 的兼容版本:
The error is below错误如下
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (~> 2.2)
rails (= 6.1.4.6) was resolved to 6.1.4.6, which depends on
bundler (>= 2.2.0)
Current Bundler version:
bundler (2.1.4)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (~> 2.2)', which is required by gem 'rails (= 6.1.4.6)', in any of the relevant sources:
the local ruby installation
Your solution is actually in the error message that you are getting.您的解决方案实际上在您收到的错误消息中。 Run
跑
gem install bundler
to install the latest version of bundler (that should satisfy the constraints安装最新版本的捆绑器(应该满足约束
You can also specify a particular version of any gem by specifying the version flag.您还可以通过指定版本标志来指定任何 gem 的特定版本。 For example.
例如。
gem install bundler -v 2.2.0
gem install bundler --version 2.2.19 --default
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.