ruby3.0、rails6.1.0で新たにrailsアプリを開発。
atomエディタのLinterが rbenv: version `ruby-3.0.0' is not installed
とのエラーを吐く。
rbenvでruby-3.0.0を入れる必要があるとのことなので、以下のコマンドを実行。
$ brew update
(時間かかった。。)
$ brew upgrade rbenv ruby-build
参考:rbenvでmacのrubyを最新にする - Qiita
すると以下のエラー。
==> 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
More Software Downloads - Apple Developerより最新のCommand Line Toolsを手動でインストール。
参考:Error: Your Xcode does not support macOS 11.0.が出た時の対処方法
その後、再度以下のコマンド。
$ brew upgrade rbenv ruby-build
Error:
homebrew-core is a shallow clone.
homebrew-cask is a shallow clone.
To `brew update`, first run:
...
なんかError吐いたけどインストールしたよう。
$ rbenv install --list
...
3.0.0
...
入ってる。
$ rbenv install 3.0.0
...
$ ruby -v
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin20]
成功。