macos 在 OS X 上重新安装 Ruby
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5227486/
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
Reinstall Ruby on OS X
提问by Colin
I've gone and messed up Ruby on my Snow Leopard Machine. I've managed to introduce all sorts of issues and I'm having a hard time cleaning things up.
我已经在我的雪豹机器上搞砸了 Ruby。我已经设法引入了各种各样的问题,而且我很难清理这些问题。
What are the steps to get me back to square one with Ruby? I'm fairly new to programming so I need it spelled out for me!
有哪些步骤可以让我回到 Ruby 的原点?我对编程还很陌生,所以我需要为我详细说明!
回答by Andrew Marshall
It sounds like what you probably want to do is clear out all your installed gems, etc.. This can be done by running
听起来您可能想要做的是清除所有已安装的 gems 等。这可以通过运行来完成
sudo rm -rf /Library/Ruby/Gems/1.8
This will leave all the gems that come with OS X (which is a good thing, since some apps may assume they're installed).
这将保留 OS X 附带的所有 gem(这是一件好事,因为某些应用程序可能会假设它们已安装)。
As macarthy said, I also highly recommend using RVMor rbenvto more easily install, destroy, and manage Ruby versions.
回答by macarthy
My suggestion would be to forget about what you have and use RVM
我的建议是忘记你有什么并使用 RVM
you can basically ignore what you have installed then.
您基本上可以忽略您当时安装的内容。