Rubyは更新されません

Rubyは更新されません

助ける! MacにCocoapodsをインストールしようとしてエラーが発生し続けるのは、Rubyのバージョンが古すぎると関連している可能性があると思います。

その後、これが起こりました。

% ruby -v
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin22]

% brew upgrade ruby
Warning: ruby 3.2.1 already installed

% ruby -v
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin22]

すでにインストールされていると出てくるのはなぜですか?

ベストアンサー1

$PATHそれでも以前(おそらくプリインストールされていますか?)Rubyのバージョンを指しているようです。

この試み:

echo $PATH
# check if it includes the dir where homebrew installs its pkgs

# if it's not there, add the path to your .zshrc
export PATH=/usr/local/bin:$PATH

# close the terminal or, alternatiively
source ~/.zshrc

# check if the path is there
echo $PATH

brew upgrade ruby

おすすめ記事