删除所有已安装的Gems并重新开始 [英] Removing all installed Gems and starting over

查看:95
本文介绍了删除所有已安装的Gems并重新开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始学习Ruby和Ruby on Rails,并观看了大量入门资料。最近我一直在发现,我一直在发现gems不会安装的错误,或者它们将被安装,但由于某种原因它们不能被使用,并且我决定将所有东西都删除,直到再次安装了Ruby并重新开始安装。一个培训视频让我用RVM安装了大部分宝石,所以我不知道这是否会改变任何事情。



所以总之我的问题是如何获得摆脱RVM,Rubygems和所有已安装的Gems,以便我可以重新开始使用Ruby?



编辑:我在Mac OS 10.6上

解决方案

RVM 支持站点:$ b​​
$ b


RVM将所有内容安装到〜/ .rvm中。
要从系统中删除RVM,请运行'rm
-rf〜/ .rvm'。您可能在〜/ .rvmrc中有一个额外的配置文件,
当然是
bash / zsh启动文件中的RVM钩子。


因此,只需进入命令行并键入 rm -rf〜/ .rvm



<所有已安装的宝石都在〜/ .rvm文件夹中,因此上述操作将一次性删除宝石和已安装的rubies。



在命令提示符下输入以下命令可以删除默认的ruby安装:

  for``gem list --no -versions`;做宝石卸载$ x -a -x -I;完成


I recently started learning Ruby and Ruby on Rails, and have watched a plethora of getting started materials. I have been finding lately that I keep getting errors where gems won't install or they will be installed but they can't be used for some reason, and I have decided that I want to remove everything down to once again just having Ruby installed and start over with the installation. One training video had me install most of my gems with RVM, so I don't know if that changes anything.

So in short my question is "How to I get rid of RVM, Rubygems, and all installed Gems so that I can start over with just Ruby?"

Edit: I am on Mac OS 10.6

解决方案

From the RVM support site:

RVM installs everything into ~/.rvm. To remove RVM from your system run 'rm -rf ~/.rvm'. You may have one additional config file in ~/.rvmrc and of course the RVM hook in your bash/zsh startup files.

So, just go to the command line and type rm -rf ~/.rvm

All the installed gems are in the ~/.rvm folders, so doing the above will remove the gems and installed rubies in one go.

Gems you added pre-RVM with the default ruby install can be removed by typing this at the command prompt:

for x in `gem list --no-versions`; do gem uninstall $x -a -x -I; done

这篇关于删除所有已安装的Gems并重新开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆