简体   繁体   English

为什么我的宝石列表在我的宝石列表中显示了一个宝石,但是却不允许我在Ruby on Rails中将其卸载?

[英]Why does my gem list show a gem in my gem list but doesn't let me uninstall it in Ruby on Rails?

Currently in my console I type gem list and it shows two versions of the diff-lcs gem: 当前在我的控制台中,我输入gem list ,它显示了diff-lcs gem的两个版本:
diff-lcs (1.1.3, 1.1.2)

When I run gem uninstall diff-lcs I get the following error: 当我运行gem uninstall diff-lcs ,出现以下错误:
INFO: gem "diff-lcs" is not installed

I'm current running RVM. 我当前正在运行RVM。 When I run rvm current I get: 当我运行rvm current我得到:
ruby-1.9.2-p290

Why is this happening? 为什么会这样呢? Shouldn't I be able to uninstall it? 我不能卸载吗?

Thanks 谢谢

RVM uses a global gemset and I've seen a similar behavior before when trying to uninstall gems from it. RVM使用全局gemset,在尝试从中卸载gem之前,我已经看到了类似的行为。 You might be able to uninstall this gem by changing to that gemset and then uninstalling them: 您可以通过更改为该gemset然后卸载它们来卸载该gem:

rvm gemset use global
gem uninstall diff-lcs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM