【发布时间】:2020-06-23 04:42:48
【问题描述】:
在开发/测试时,我的控制台中不断出现此错误
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 然后删除 bundler 2.1.2 时,控制台给了我这个输出。
Gem bundler-2.1.2 cannot be uninstalled because it is a default gem
Successfully uninstalled bundler-2.1.4
这个问题有什么解决办法吗?提前致谢
【问题讨论】:
-
你试过
gem install bundler应该安装最后一个Bundler 版本吗? -
仍然报同样的错误。但是当我用 Rails 5.2 项目尝试我的步骤时,它正在工作。可能是 Rails 6 的问题?
-
我必须运行
gem update --system。
标签: ruby-on-rails bundler ruby-on-rails-6