MacOS Installation Gem::FilePermissionError

Okay, so you’re using the system ruby for Discourse which is why you’re getting that issue.

Check the PATH variable by typing in echo $PATH. You should see /Users/<your username>/.rbenv/bin and /Users/<your username>/.rbenv/shims listed in there.

If not, add them in your shell’s configuration file .bashrc or .zshrc. For ZSH you can add it like this: export PATH=/path/number/1:/path/number/2:$PATH

If you do see them, check to see what order they’re in. If they are later in the chain, they’re probably not getting loaded before the system ruby meaning the system ruby is being used for Discourse. You can use the same approach above for moving the paths further up the chain.