如何在 Mac OS X 上卸载 Ruby on Rails?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4115803/
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
How can I uninstall Ruby on Rails on Mac OS X?
提问by Jeff
I am following a tutorial about Ruby on Rails, and the tutorial got updated to a new version of Rails, so I can't follow it anymore because I have an older version.
我正在关注有关 Ruby on Rails 的教程,并且该教程已更新为新版本的 Rails,因此我无法再关注它,因为我有一个旧版本。
I would like to start new and uninstall Ruby on Rails and any related software on my Mac OS X 10.5.8, and follow it from ground up. If anyone would be willing to help me uninstall Ruby and Ruby on Rails, it would be much appreciated.
我想在我的 Mac OS X 10.5.8 上开始新的并卸载 Ruby on Rails 和任何相关软件,并从头开始。如果有人愿意帮助我卸载 Ruby 和 Ruby on Rails,我将不胜感激。
回答by Kevin Sylvestre
回答by the Tin Man
Are you uninstalling Ruby on Rails, or Ruby ANDRuby on Rails?
您是要卸载 Ruby on Rails,还是 Ruby ANDRuby on Rails?
If you want to uninstall Ruby on Rails it should be a simple matter of using gems uninstall railsor doing gems dependency railsand then gems uninstallfor each of the listed gems that Rails depends on. If you installed them system-wide, using sudooriginally, you'll have to use sudoagain to uninstall them.
如果你想卸载Ruby on Rails的应该是用一个简单的事情gems uninstall rails或做gems dependency rails,然后gems uninstall为每个列出的宝石Rails所依赖。如果您在系统范围内安装它们,sudo最初使用,您将不得不sudo再次使用以卸载它们。
If you want to uninstall a system-wide Ruby you installed from source, well, I'd probably leave it alone and install any new versions of Ruby using RVM. The older version won't be visible to apps unless you want them to see it or set your path to include it. RVM's version will be found first unless you do rvm system.
如果您想卸载从源代码安装的系统范围的 Ruby,那么我可能会不理会它并使用 RVM 安装任何新版本的 Ruby。旧版本对应用程序不可见,除非您希望他们看到它或设置路径以包含它。除非您这样做,否则将首先找到 RVM 的版本rvm system。
Actually you could simply install RVM and have it install your new versions of Ruby, then from there install new versions of Rails, without even bothering to uninstall the old stuff. RVM is that cool.
实际上,您可以简单地安装 RVM 并让它安装您的新版本的 Ruby,然后从那里安装新版本的 Rails,甚至不必费心卸载旧的东西。RVM 很酷。

