如何使用 RVM 卸载 ruby​​ 和 gems?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8868555/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 02:38:23  来源:igfitidea点击:

How do I uninstall ruby and gems using RVM?

ruby-on-railsrvm

提问by Nathan

I'm just learning to use RVM, and would like to know how I can do the following:

我刚刚学习使用 RVM,想知道如何执行以下操作:

  1. Remove a specific version of Ruby and/or all versions of Ruby.
  2. Verify the removal that version, both using RVM and simply looking into my directories, config files, etc (where should I look?)
  3. Installing a specific version of Ruby.
  1. 删除特定版本的 Ruby 和/或所有版本的 Ruby。
  2. 使用 RVM 和简单地查看我的目录、配置文件等(我应该在哪里查看?)
  3. 安装特定版本的 Ruby。

Also, how would I do the above with gems?

另外,我将如何使用宝石进行上述操作?

Thanks in advance for your help.

在此先感谢您的帮助。

回答by Ben Woodall

Basically taken from http://beginrescueend.com/rvm/:

基本上取自http://beginrescueend.com/rvm/

To list the available ruby versions to install type:

要列出要安装的可用 ruby​​ 版本,请键入:

rvm list known

To then install from the list of known, type:

然后从已知列表安装,键入:

rvm install VERSION_NUMBER

To then use the ruby version you have installed:

然后使用您安装的 ruby​​ 版本:

rvm use VERSION_NUMBER

You can make a certain ruby version your system default version:

您可以将某个 ruby​​ 版本设为您的系统默认版本:

rvm use VERSION_NUMBER --default

To remove the ruby version and keep the gemsets:

要删除 ruby​​ 版本并保留 gemsets:

rvm uninstall VERSION_NUMBER

To remove ruby and its associated gemsets:

要移除 ruby​​ 及其相关的 gemset:

rvm remove VERSION_NUMBER

To learn about your ruby environment and where they are installed / aliased:

要了解您的 ruby​​ 环境以及它们的安装位置/别名:

rvm info