Xcode does not support macOS in brew upgrade rbenv ruby-build error

Developed a new rails app with ruby3.0 and rails 6.1.0. Linter in the atom editor throws an error saying rbenv: version `ruby-3.0.0'is not installed.

Since it is necessary to insert ruby-3.0.0 in rbenv, execute the following command.

$ brew update
(It took time ...)
$ brew upgrade rbenv ruby-build

Reference: Update mac ruby ​​with rbenv -Qiita

Then the following error.

==> Installing ruby-build
Error: Your Xcode does not support macOS 11.
It is either outdated or was modified.
Please update your Xcode or delete it if no updates are available.
Xcode can be updated from the App Store.

Error: An exception occurred within a child process:
  SystemExit: exit

Manually install the latest Command Line Tools from More Software Downloads -Apple Developer.

Reference: Error: Your Xcode does not support macOS 11 \ .0 . What to do when it appears

After that, the following command again.

$ brew upgrade rbenv ruby-build
Error:
  homebrew-core is a shallow clone.
  homebrew-cask is a shallow clone.
To `brew update`, first run: 
...

I got an error, but it seems to be installed.

$ rbenv install --list
...
3.0.0
...

It's in.

$ rbenv install 3.0.0
...
$ ruby -v
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin20]

success.

Recommended Posts

Xcode does not support macOS in brew upgrade rbenv ruby-build error
Correspondence when Ruby version does not switch in rbenv
Error in ./gradlew: Symbol not found