当我开发/测试时,我总是在我的控制台中得到这个错误
Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.1.4). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.1.4`.
这根本不是阻挡我,而是骚扰我。我知道最简单的解决方案就是更新我的Gemfile.lock。
BUNDLED WITH
2.1.2
但我想永久解决这个问题。我试着
gem uninstall bundler
然后
gem install bundler -v 2.1.4
它让我犯了这个错误
Gem bundler-2.1.2 cannot be uninstalled because it is a default gem
当我尝试首先安装2.1.4,然后删除绑定程序时,2.1.2控制台就会给出这个输出。
Gem bundler-2.1.2 cannot be uninstalled because it is a default gem
Successfully uninstalled bundler-2.1.4
这个问题有什么解决办法吗?提前感谢
发布于 2022-07-11 14:57:34
Ruby提供了一组默认的宝石。邦德勒就是其中之一。随Ruby一起发布的default version of 很快就会过时。若要更新标准宝石,请运行
gem update --system
有关更多信息,请参见 command reference。
如果您不想更新您的标准宝石,也可以在包(Gemfile.lock
)的上下文中更新Bundler。这是可能的since v1.14。
bundle update --bundler
这一警告的时间应该超过since v2.3.5 (2022年1月)。它现在自动获取匹配的远程版本并安装它。
Bundler 2.3.17 is running, but your lockfile was generated with 2.3.7. Installing Bundler 2.3.7 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 2.3.7
Installing bundler 2.3.7
…
https://stackoverflow.com/questions/60631953
复制相似问题