This is probably a terrible answer that doesn't show a full understanding of the situation, but what worked for me was:
- if using zsh, any Stack Overflow answers saying to do something to bash files should instead be done to zsh files - i.e. inspect these files
~/.zshenv
and ~/.zshrc
(not their bash equivalents)
- I then corrected for this problem - that is, commented out the first line
The closed and reopened zsh (terminal) and suddenly ruby -v
returned the desired 2.7.1
Note: there was another problem, outside my app, ruby -v
was 2.7.1, but inside the app directly, it was still returning 2.5.1, that was due to a file called .ruby-version
, which needed to be updated. Now that I look back on this problem, I think that was the only problem