3

我试图从我的项目中删除一个 gem,所以我进入 gem 文件并将其注释掉。

...
gem some_gem
# gem 'gem_I_dont_want'
gem another_gem
....

然后我跑

bundle

要检查 gem 是否消失,我输入

bundle show

但我仍然看到那里的宝石

...
* some_gem
* gem_I_dont_want
* another_gem

我不明白捆绑是如何工作的吗?还有什么我应该做的吗?

4

2 回答 2

4

gem 可能是另一个 gem 的依赖项,这将解释它在bundle show.

如果 gem 缩进到 Gemfile.lock 文件中的另一个 gem 下方,则表明它仍然包含在内,因为它是一个依赖项。

于 2013-06-17T23:04:34.933 回答
1

There is still this gem until you clean your Bundle using:

bundle clean

But you don't need to fear. It mean that this package is installed but it wouldn't load into your app until you let it.

于 2013-06-17T21:47:24.723 回答