I have been trying to solve this issue during 3-4 hours but do not get any answer yet.
run : $gem install xcpretty
it shows below error:
ERROR: While executing gem ... (Errno::EACCES) Permission denied @ rb_sysopen - /Library/Ruby/Gems/2.3.0/gems/rouge-2.0.7/Gemfile
and getting ruby upgrade issue, then installed ruby newly with updated version.
run : $sudo gem install xcpretty
then it shows below error :
Fetching: rouge-2.0.7.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
then getting gem upgrade issue, and solved with upgrading gem.
tried again as well as with below command also run : sudo gem install xcpretty --verbose
even though used 'sudo chmod -R 777' also into my /usr/bin directory
But still getting :
Fetching: rouge-2.0.7.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/bin directory.