简体   繁体   English

如何在 Mac OS X 上卸载 Ruby on Rails?

[英]How can I uninstall Ruby on Rails on Mac OS X?

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.我想在我的 Mac OS X 10.5.8 上开始新的并卸载 Ruby on Rails 和任何相关软件,并从头开始。 If anyone would be willing to help me uninstall Ruby and Ruby on Rails, it would be much appreciated.如果有人愿意帮助我卸载 Ruby 和 Ruby on Rails,我将不胜感激。

Download RVM or RBENV and upgrade to the latest Ruby (2.3.0 at this point).下载RVMRBENV并升级到最新的 Ruby(此时为 2.3.0)。 Don't touch your system Ruby.不要碰你的系统 Ruby。

Are you uninstalling Ruby on Rails, or Ruby AND Ruby on Rails?您是要卸载 Ruby on Rails,还是 Ruby AND Ruby on Rails?

If you want to uninstall Ruby on Rails it should be a simple matter of using gem uninstall rails or doing gem dependency rails and then gem uninstall for each of the listed gems that Rails depends on.如果您想卸载 Ruby on Rails,那么使用gem uninstall rails或执行gem dependency rails应该是一个简单的问题,然后为 Rails 依赖的每个列出的 gem 进行gem uninstall If you installed them system-wide, using sudo originally, you'll have to use sudo again to uninstall them.如果您在系统范围内安装它们,最初使用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.如果您想卸载从源代码安装的系统范围的 Ruby,那么我可能会不理会它并使用 RVM 安装任何新版本的 Ruby。 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 .除非您执行rvm system否则将首先找到 RVM 的版本。

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 并让它安装您的新版本的 Ruby,然后从那里安装新版本的 Rails,甚至不必费心卸载旧的东西。 RVM really is that cool. RVM 真的很酷。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM