本文介绍了使用多个Bundler版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经加入了一个使用捆绑程序版本1.17.1的项目。目前,我的系统正在使用捆绑程序2.0.2。我有什么办法可以指定捆绑程序版本,就像用 rbenv 指定ruby版本一样。像这样的东西:

I've joined a project which is using bundler version 1.17.1 . Currently my system is using bundler 2.0.2 . Is there any way for me to specify a bundler version just like specifying ruby version with rbenv. Something likes:

bundler --global 1.17.1

因此,当我运行命令 bundler -v 时,我将收到结果 1.71。 1 而不是 2.0.2

So that, when I run the command bundler -v I will receive the result 1.71.1 rather than 2.0.2

我尝试使用 gem卸载捆绑器并收到以下消息:

I tried to uninstall the current bundler with gem uninstall bundler and received this message:

$ gem uninstall bundler

Select gem to uninstall:
 1. bundler-1.17.1
 2. bundler-1.17.3
 3. bundler-2.0.2
 4. All versions
> 

这使我认为有某种方法可以使用多个捆绑软件版本。

That makes me think there is a certain way allows me to work with multiple bundler versions. Any clues just for pointing me to where I should look up would be really appreciated.

我真的很感激。尝试了 bundle _1.17.1_ --version ,它没有按我的预期工作

I tried bundle _1.17.1_ --version and it didn't work as I expected

$ bundler -v
Bundler version 2.0.2
$ bundle _1.17.1_ --version
Bundler version 1.17.1
$ bundler -v
Bundler version 2.0.2

预期: Bundler版本1.17.1

expected: Bundler version 1.17.1

实际: Bundler版本2.0.2

actual: Bundler version 2.0.2

推荐答案

尝试以下操作:

1) gem install bundler -v 1.17 .1

2) 捆绑包_1.17.1_安装

这篇关于使用多个Bundler版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 22:14