I keep trying to get ruby on my system from v 2.3.7 to v 2.7.1 but no matter what command I enter (update, install, rbenv global etc) it stays with the old version. I think it's an old installation that doesn't get overwritten when I install a new version, but whenever I try to run something with the "ruby" command it only uses the 2.3.7 install.
Here's an example of what I'm talking about. This was after was trying to uninstall everything I could to do a full reinstall, but I can't even figure out how to uninstall it. I then tried to upgrade the ruby version that the system was telling me was there, but brew couldn't find it.
$ ruby -v
ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
$ brew upgrade ruby
Updating Homebrew...
Error: ruby not installed
brew upgrade ruby
upgrades the ruby installed by Homebrew . "Error: ruby not installed" says you don't have Ruby installed by Homebrew. Homebrew will not upgrade the Ruby that comes with MacOS.
Instead, brew install ruby
. This will leave your MacOS Ruby alone and install its own.
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.