Error

You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.

Reason

The default Ruby can't be used and /usr/lib is prohibitted to write in. You need to install a new ruby in your user folder.

Solution

Install Ruby using rbv tools and switch ruby source to the new path.