如何从我的系统中删除RVM (Ruby版本管理器)?
当前回答
对于其他试图修复PATH变量的shell新手
在遵循已接受答案中的说明后,如果需要,检查并修改PATH变量:
env | grep PATH
如果你在任何地方看到“rvm”,你需要弄清楚你在哪里设置PATH并修改。我把它设置在3个文件-所以检查所有以下文件:
vim .bashrc
使用dd命令删除文件中引用rvm的行。:wq保存并退出。 Source .bashrc来“重载”
对.profile和.bash_profile重复这个过程(从vim命令开始)
其他回答
注意,如果你通过apt-get安装RVM,你必须运行一些比RVM implode或apt-get remove ruby-rvm更深入的步骤来真正卸载它。
参见“在Ubuntu上安装RVM”。
如果其他答案不能完全为您删除RVM, RVM的故障排除页面包含此部分:
How do I completely clean out all traces of RVM from my system, including for system wide installs? Here is a custom script which we name as cleanout-rvm. While you can definitely use rvm implode as a regular user or rvmsudo rvm implode for a system wide install, this script is useful as it steps completely outside of RVM and cleans out RVM without using RVM itself, leaving no traces. #!/bin/bash /usr/bin/sudo rm -rf $HOME/.rvm $HOME/.rvmrc /etc/rvmrc /etc/profile.d/rvm.sh /usr/local/rvm /usr/local/bin/rvm /usr/bin/sudo /usr/sbin/groupdel rvm /bin/echo "RVM is removed. Please check all .bashrc|.bash_profile|.profile|.zshrc for RVM source lines and delete or comment out if this was a Per-User installation."
根据RVM的故障排除文档“如何从系统中完全清除RVM的所有痕迹,包括系统范围的安装?”:
Here is a custom script which we name as 'cleanout-rvm'. While you can definitely use rvm implode as a regular user or rvmsudo rvm implode for a system wide install, this script is useful as it steps completely outside of RVM and cleans out RVM without using RVM itself, leaving no traces. #!/bin/bash /usr/bin/sudo rm -rf $HOME/.rvm $HOME/.rvmrc /etc/rvmrc /etc/profile.d/rvm.sh /usr/local/rvm /usr/local/bin/rvm /usr/bin/sudo /usr/sbin/groupdel rvm /bin/echo "RVM is removed. Please check all .bashrc|.bash_profile|.profile|.zshrc for RVM source lines and delete or comment out if this was a Per-User installation."
除了@tadman的回答,我删除了/usr/local/bin以及文件/etc/profile.d/rvm.中的包装器
包装材料包括:
erb
gem
irb
rake
rdoc
ri
ruby
testrb
对于其他试图修复PATH变量的shell新手
在遵循已接受答案中的说明后,如果需要,检查并修改PATH变量:
env | grep PATH
如果你在任何地方看到“rvm”,你需要弄清楚你在哪里设置PATH并修改。我把它设置在3个文件-所以检查所有以下文件:
vim .bashrc
使用dd命令删除文件中引用rvm的行。:wq保存并退出。 Source .bashrc来“重载”
对.profile和.bash_profile重复这个过程(从vim命令开始)
推荐文章
- 是否可以在MiniTest中运行单个测试?
- 如何在Ruby中生成a和b之间的随机数?
- 无法安装gem -未能建立gem本地扩展-无法加载这样的文件——mkmf (LoadError)
- 如何在Ruby中创建文件
- 什么是Ruby文件。开放模式和选项?
- Ruby数组到字符串的转换
- 如何分割(块)一个Ruby数组成X元素的部分?
- Ruby中“or”和||的区别?
- 如何测试参数是否存在在轨道
- 库未加载:libmysqlclient.16。在OS X 10.6上使用mysql2 gem运行'rails server'时出现dylib错误
- 在Ruby中不创建新字符串而修饰字符串的规范方法是什么?
- RVM不是一个函数,用' RVM use…’不会起作用
- 了解Gemfile。锁文件
- 如何确定一个数组是否包含另一个数组的所有元素
- 是什么导致这个ActiveRecord::ReadOnlyRecord错误?