如何在OSX上卸载rbenv ?

时间:2021-12-23 15:28:18

How do you uninstall rbenv on OSX? My version of rbenv is messed up, and brew uninstall rbenv isn't working because brew relies on ruby.

如何在OSX上卸载rbenv ?我的rbenv版本搞砸了,brew uninstall rbenv无法运行,因为brew依赖于ruby。

2 个解决方案

#1


36  

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 errors from my experience.

我采取了这些步骤,成功地摆脱了我的mac运行的El Capitan上的rbenv(10.11.4)。根据我的经验,Rbenv是导致无法构建gem本机扩展错误的主要原因。

  • Remove using brew: brew remove rbenv
  • 使用冲泡剂:冲泡,去除rbenv。
  • Delete .rbenv directory: rm -rf ~/.rbenv
  • 删除。rbenv目录:rm -rf ~/.rbenv。
  • Open .bash_profile file and delete any lines with rbenv in them: vi ~/.bash_profile
  • 打开。bash_profile文件并删除其中包含rbenv的任何行:vi ~/.bash_profile
  • Open .bashrc file and delete any lines with rbenv in them: vi ~/.bashrc
  • 打开.bashrc文件,并删除任何带有rbenv的行:vi ~/.bashrc。

Finally, reload .bash_profile and .bashrc:

最后,重载。bash_profile和。bashrc:

. ~/.bash_profile && . ~/.bashrc

。~ /。bash_profile & &。~ / . bashrc

#2


7  

I think you should be able to uninstall rbenv by simply removing ~/.rbenv.

我认为只要删除~/.rbenv就可以卸载rbenv。

rm -rf ~/.rbenv

Or, if you installed rbenv via Homebrew, you can do

或者,如果你通过Homebrew安装了rbenv,你可以这么做

rm -rf `brew --prefix`/Cellar/rbenv

#1


36  

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 errors from my experience.

我采取了这些步骤,成功地摆脱了我的mac运行的El Capitan上的rbenv(10.11.4)。根据我的经验,Rbenv是导致无法构建gem本机扩展错误的主要原因。

  • Remove using brew: brew remove rbenv
  • 使用冲泡剂:冲泡,去除rbenv。
  • Delete .rbenv directory: rm -rf ~/.rbenv
  • 删除。rbenv目录:rm -rf ~/.rbenv。
  • Open .bash_profile file and delete any lines with rbenv in them: vi ~/.bash_profile
  • 打开。bash_profile文件并删除其中包含rbenv的任何行:vi ~/.bash_profile
  • Open .bashrc file and delete any lines with rbenv in them: vi ~/.bashrc
  • 打开.bashrc文件,并删除任何带有rbenv的行:vi ~/.bashrc。

Finally, reload .bash_profile and .bashrc:

最后,重载。bash_profile和。bashrc:

. ~/.bash_profile && . ~/.bashrc

。~ /。bash_profile & &。~ / . bashrc

#2


7  

I think you should be able to uninstall rbenv by simply removing ~/.rbenv.

我认为只要删除~/.rbenv就可以卸载rbenv。

rm -rf ~/.rbenv

Or, if you installed rbenv via Homebrew, you can do

或者,如果你通过Homebrew安装了rbenv,你可以这么做

rm -rf `brew --prefix`/Cellar/rbenv