ruby-on-rails - 警告:Bundler 的运行版本比创建锁文件错误的版本旧
问题描述
当我开发/测试时,我的控制台中不断出现此错误
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
这个问题有什么解决办法吗?提前致谢
解决方案
根据 Anne van Rossum,gem update --system 为我解决了这个问题。
推荐阅读
- ios - 放大 DataStore 同步表达式未重新评估
- swift - 由于滚动而刷新时,空集合视图崩溃
- mapbox - 无论在 MapBox 中如何缩放,如何显示更多等高线
- javascript - 为什么 npm start 不起作用,react app 没有在浏览器中打开。react 和 npm 都不起作用?
- amazon-s3 - 看不到从 S3 返回的标头上的元数据
- xml - 如何在 XSLT 中拆分数据并存储在多个节点中
- python - 使用 pandas 操作数据时出错(以防数据丢失)
- java - 在 google colab 中上传文件
- c++ - 无法生成预期的输出
- splunk - 在 splunk 中将国旗表情符号注释到 3166 个国家/地区代码