ruby 你如何在 macOS 上卸载 rbenv?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31173968/
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 you uninstall rbenv on macOS?
提问by williamcodes
How do you uninstall rbenv on macOS? My version of rbenv is messed up, and brew uninstall rbenvisn't working because brew relies on?ruby.
你如何在 macOS 上卸载 rbenv?我的 rbenv 版本搞砸了,brew uninstall rbenv无法工作,因为 brew 依赖于?ruby。
回答by Red
I took these steps to successfully get rid of rbenv on my mac running El Capitan (10.11.4). Rbenv is a major cause of Failed to build gem native extension errorsfrom my experience.
我采取了这些步骤来成功摆脱运行 El Capitan (10.11.4) 的 Mac 上的 rbenv。Failed to build gem native extension errors根据我的经验,rbenv 是一个主要原因。
- Remove using brew:
brew remove rbenv - Delete
.rbenvdirectory:rm -rf ~/.rbenv - Open
.bash_profilefile and delete any lines with rbenv in them:vi ~/.bash_profile - Open
.bashrcfile and delete any lines with rbenv in them:vi ~/.bashrc
- 使用 brew 删除:
brew remove rbenv - 删除
.rbenv目录:rm -rf ~/.rbenv - 打开
.bash_profile文件并删除其中包含 rbenv 的任何行:vi ~/.bash_profile - 打开
.bashrc文件并删除其中包含 rbenv 的任何行:vi ~/.bashrc
Finally, reload .bash_profileand .bashrc:
最后,重新加载.bash_profile和.bashrc:
. ~/.bash_profile && . ~/.bashrc
. ~/.bash_profile && 。~/.bashrc
回答by NigoroJr
I think you should be able to uninstall rbenv by simply removing ~/.rbenv.
我认为您应该能够通过简单地删除~/.rbenv.
rm -rf ~/.rbenv
Or, if you installed rbenv via Homebrew, you can do
或者,如果你通过 Homebrew 安装了 rbenv,你可以这样做
rm -rf `brew --prefix`/Cellar/rbenv

