I was trying to install Travis.rb as documented by the team. However, the location that gem
tried to install to is protected by the OS. So I got an error like this:
% gem install travis
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
I tried the following command but did not fully work - installation was okay, but I could not call % travis
.
gem install travis --user-install
Configuration: I am using gem
shipped with the OS:
% ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
sudo
?sudo
, because what I am installing should not have root access when executing.sudo
doesn’t give the executable root permissions. Calling the executable withsudo
does that. Installing withsudo
gives the installer permission to install it in whatever dir for which you don’t have proper permissions set.sudo
your install or repair permissions./Library/
is now a protected directory by the OS. I don't feeltravis
should go so far that I need to disable SIP to install.\curl -sSL https://get.rvm.io | bash -s stable
; restart your shell; install Ruby withrvm install 2.6.0
. Don't use system Ruby.