如何使用 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
How do I uninstall ruby and gems using RVM?
提问by Nathan
I'm just learning to use RVM, and would like to know how I can do the following:
我刚刚学习使用 RVM,想知道如何执行以下操作:
- Remove a specific version of Ruby and/or all versions of Ruby.
- Verify the removal that version, both using RVM and simply looking into my directories, config files, etc (where should I look?)
- Installing a specific version of Ruby.
- 删除特定版本的 Ruby 和/或所有版本的 Ruby。
- 使用 RVM 和简单地查看我的目录、配置文件等(我应该在哪里查看?)
- 安装特定版本的 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

