警告:锁文件正在更新为Bundler 2,之后您将无法返回Bundler 1 [英] Warning: the lockfile is being updated to Bundler 2, after which you will be unable to return to Bundler 1

查看:134
本文介绍了警告:锁文件正在更新为Bundler 2,之后您将无法返回Bundler 1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Gemfile中放入了一些新的宝石,并进行了捆绑安装
安装成功,但是最后我收到以下警告:

I put some new gems in my Gemfile and ran bundle install. The installation went successfully, but at the end I got this warning:


警告:锁文件正在更新为Bundler 2 ,之后您将无法返回到Bundler 1。

Warning: the lockfile is being updated to Bundler 2, after which you will be unable to return to Bundler 1.

这是什么意思-我的意思是,它显然指出了锁文件是升级到Bundler2后,我将无法返回到Bundler 1,但是,我是否应该对此感到担心?此后是否存在不兼容的危险?为什么会自动更新?

What does this mean - I mean it obviously states that the lockfile is being updated to Bundler2 and I wont be able to return to Bundler 1, and yet, should I be concerned about this? Is there any danger of non-compatibility after this? Why is it updated automatically?

推荐答案

除非您需要在任何地方将Bundler v1与该项目一起使用,否则无需担心。唯一的不兼容性将适用于只能安装Bundler v1的开发人员或环境。

It’s not something to worry about unless you need to use the project with Bundler v1 anywhere. The only non-compatibility will be for developers or environments who can only have Bundler v1 installed.

来自文档


如果我的应用程序需要Bundler,该怎么办? 2,但是我只安装了
Bundler 1?

如果您尝试在需要Bundler的应用程序
上使用Bundler 1 2,您将看到一条错误消息,说明您需要安装Bundler2。
。继续运行 gem install bundler
,然后运行它

If you try to use Bundler 1 on an application that requires Bundler 2, you’ll see an error message explaining that you need to install Bundler 2. Go ahead and run gem install bundler, and then it should work.

这是不可逆的更改,因此您不能倒退。

This is an irreversible change, so you can’t go backwards.


我可以将我的应用程序从Bundler 2降级到Bundler 1吗?

Bundler 2不能提供一种将Gemfile降级到Bundler 1的方法。
相反,我们建议您在y中签入在升级应用程序
之前,我们的 Gemfile Gemfile.lock 。这样,如果出现问题,您
可以还原到上一个提交并返回使用Bundler 1。

Bundler 2 does not provide a way to downgrade a Gemfile back to Bundler 1. Instead, we recommend checking in your Gemfile and Gemfile.lock before you upgrade your application. That way, if something goes wrong, you can revert to the previous commit and go back to using Bundler 1.

如果它自动更新,而您未指定-bundle 开关,则可能是因为您更新的宝石之一依赖于更新版本的Bundler本身。检查您的 Gemfile.lock ,看看是否有任何宝石都将Bundler作为依赖项。

If it updated automatically and you didn’t specify the --bundle switch, that might be because one of the gems you updated had a dependency on Bundler itself at a more recent version. Check your Gemfile.lock and see if any gems have Bundler as a dependency.

这篇关于警告:锁文件正在更新为Bundler 2,之后您将无法返回Bundler 1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆