This is a workaround for Gem errors that occurred when Re: View was installed.
$ gem install review
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
An error like this is output.
$ sudo gem install review
I think that you can install it by sudo
as above, but this time I want to install it in the user area, so I will explicitly specify ** installation destination (GEM_HOME) ** to avoid the error.
$ mkdir -p $HOME/rubygems
$ export GEM_HOME=$HOME/rubygems
$ export PATH=$GEM_HOME/bin:$PATH
Write these 3 lines in ~ / .zshrc
etc. and complete.
There is no trouble due to authority.
[ruby] Install gem in user area-Life.
Recommended Posts