0

Help! Trying to install Cocoapods on my mac, kept getting an error, thought it might be something to do with having a really old version of Ruby.

Then this happened:

% 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]

Why is it saying that it's already installed?

Chris Davies
  • 116,213
  • 16
  • 160
  • 287

1 Answers1

0

Looks like it could be that your $PATH still points to the old (pre-installed, maybe?) Ruby version.

Try this:

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

telometto
  • 1,975