Problem

/Users/<username>/.asdf/shims/rails: line 4: /opt/homebrew/Cellar/asdf/<version>/libexec/bin/asdf: No such file or directory

Solution

rm -rf ~/.asdf/shims
asdf reshim