在 OS X 上重新安装 Ruby
我已经把我的 Snow Leopard 机器上的 Ruby 弄乱了。我已经设法引入了各种各样的问题,但我很难清理这些问题。
要让我重新开始使用 Ruby,需要采取哪些步骤?我对编程相当陌生,所以我需要为我详细说明!
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.
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来您可能想要做的就是清除系统 Ruby 中所有全局安装的 gem。这可以通过运行以下命令来完成:
这将保留 OS X 附带的所有 gem(这是一件好事,因为某些应用程序可能会假设它们已安装)。
正如 Macarthy 所说,我还强烈建议使用 Ruby 版本管理器(例如 rbenv 或 RVM)以更轻松地安装、删除和管理 Ruby 版本。
It sounds like what you probably want to do is clear out all your globally installed gems in the system Ruby. This can be done by running the following:
This will leave all the gems that come with OS X (which is a good thing, since some apps may assume they're installed).
As macarthy said, I also highly recommend using a Ruby version manager (e.g. rbenv or RVM) to more easily install, remove, and manage Ruby versions.
我的建议是忘记你拥有的东西并使用 RVM
你基本上可以忽略你拥有的东西然后安装。
My suggestion would be to forget about what you have and use RVM
you can basically ignore what you have installed then.