6

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)

Andre Wildberg
  • 12,344
  • 3
  • 12
  • 29
Pavan Alapati
  • 635
  • 2
  • 8
  • 21
  • 1
    Why do you want want to uninstall Ruby? How did you install Ruby? Do you use an version manager like rbenv or RVM? What is the output of `which ruby` – spickermann Sep 15 '16 at 11:57
  • @spickermann thanks for reply .We install ruby using RVM.OutPut of Which ruby :-/usr/bin/ruby. We are working on Prefix invermetal setup.We goto error regards sudo gem install cf-uaac --http-proxy http://sjc1intproxy01.crd.ge.com:8080 After r&d We found ,we need changed location on ruby currently it located in usr/bin – Pavan Alapati Sep 15 '16 at 12:14
  • 2
    You seemt o not properly loading RVM so that your RVM-installed rubies are not properly detected. You should fix this instead of messing with the system-Ruby. – Holger Just Sep 15 '16 at 14:17

1 Answers1

1

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.

Steven
  • 1,088
  • 1
  • 8
  • 16
  • 2
    brew link --overwrite ruby no longer works https://nathankleyn.com/2019/01/15/homebrew-system-util-breaking-change/ – Gwater17 May 28 '20 at 21:29