简体   繁体   中英

How to remove Ruby from OS X

We have ruby with version ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15] . We need uninstall ruby and install again. So we tried like this

Anshuls-Mac-mini-2:~ pankajthakur$ whereis ruby
/usr/bin/ruby
Anshuls-Mac-mini-2:~ pankajthakur$ rm -f /usr/bin/ruby
rm: /usr/bin/ruby: Permission denied

We need re-install in other location. Please guide to us.

My current MAC os Version 10.11.5 (El Capitan)

I got exactly the same version on one of my computer and I used Homebrew to install the latest version and overwrite the old one.

In your terminal run brew install ruby to download the latest version and then run brew link --overwrite ruby to replace your version of Ruby.

You can also use rbenv to install and run different version of Ruby on your computer brew install rbenv .

EDIT: I think rbenv might be the easiest way to manage your Ruby environment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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