且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在macOS上卸载rbenv?

更新时间:2023-12-02 16:44:58

我采取了以下步骤,在运行El Capitan(10.11.4)的Mac上成功摆脱了rbenv.根据我的经验,Rbenv是Failed to build gem native extension errors的主要原因.

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.

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

最后,重新加载.bash_profile.bashrc:

. 〜/.bash_profile&& . 〜/.bashrc

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