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)
MacOS comes with a “system Ruby” pre-installed. If you see /usr/bin/ruby when you use the which command, it is the pre-installed macOS system Ruby. It's a bad idea to use the Mac system, Ruby, for developing Ruby applications (it's fine to use it for running utility scripts).
Any gems that you install while using an RVM's ruby version, is self contained in that version. However there may come a time when you no longer want to use a particular ruby version and want to delete it along with all it's gems. Then this can be done using the “remove” command.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With