Remove RVM, Ruby and gems completely?

旧街凉风 提交于 2020-01-06 03:38:05

问题


I had to downgrade Rails and now the gems, the versions, and everything, are completely messed up and I feel like jumping from my window.

I just want to destroy everything related with RVM, Ruby and gems to make sure I make a 100% clean reinstallation.

How can I do that?


回答1:


Linux and installed as regular user ? Than all you need to do is:

rm -Rf ./.rvm
rm -Rf ./.gem
rm -f ./.gemrc

You can also check ~/.bashrc and ~/.bash_profile files for lines like this:

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

This should be enough. If you've installed it in some custom way then try this:

$ rvm list # to see what version you have installed
$ rvm gemdir # to see where are gemfiles located

There is something like rvm remove as well but, if you want to just remove all, than it's not very interesting I think.




回答2:


If you have installed everything via rvm a simple

rvm implode

will remove all traces of rvm including rubies and gems. Even (as far as I remember, I'm not testing it right now) the shell files are updated.




回答3:


rvm implode which removes all ruby installations rvm manages, everything in ~/.rvm



来源:https://stackoverflow.com/questions/22769949/remove-rvm-ruby-and-gems-completely

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!