Error occurred when installing software via gem in MacOS: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
Cause
MacOS’s built-in Ruby requires access to system directories, which has insufficient permissions.
Solution
In order to keep the built-in Ruby in MacOS without affecting Ruby development, you can install an additional Ruby.