gem 像 pipsi 一样隔离吗?

Does gem isolate like pipsi?

pipsi 允许您安装 Python 具有独立依赖项的应用程序。它不仅隔离依赖项(如 virtualenv),应用程序还可以立即执行(如 pip)。例如:

pipsi install foo # has strict dependency on Xv1.0
pipsi install bar # has strict dependency on Xv2.0
foo --version # works immediately
bar --help # works immediately

我需要使用 gem 安装一些 Ruby 工具。 gem 是否提供类似的隔离?换句话说:

gem install foo # has strict dependency on Xv1.0
gem install bar # has strict dependency on Xv2.0
foo --version # works immediately
bar --help # works immediately

不,gem 不会隔离像 pipsi 这样的包。它只是安装 gem 依赖项,Ruby 相当于 Python 的 pip

pip 一样,您使用 gem 安装的任何内容都可以立即执行(如果适用)。所以你可以:

gem install foo
foo --help

...但是 foobar 之间的依赖关系不是孤立的。