Open RaziPour1993 opened 5 years ago
Did you perhaps install this with sudo gem install cocoapods-keys
? I'd recommend installing without sudo, instructions are here: https://guides.cocoapods.org/using/getting-started.html#sudo-less-installation
Basically, if you install with sudo
then the gem "belongs" to the superuser and not you. This would require you to run sudo pod install
, for example (please don't do this!).
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin21/rbconfig.rb:230: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.
/Library/Ruby/Site/2.6.0/rubygems/installer.rb:712:in verify_gem_home' /Library/Ruby/Site/2.6.0/rubygems/installer.rb:902:in
pre_install_checks'
/Library/Ruby/Site/2.6.0/rubygems/installer.rb:302:in install' /Library/Ruby/Site/2.6.0/rubygems/resolver/specification.rb:104:in
install'
/Library/Ruby/Site/2.6.0/rubygems/request_set.rb:194:in block in install' /Library/Ruby/Site/2.6.0/rubygems/request_set.rb:182:in
each'
/Library/Ruby/Site/2.6.0/rubygems/request_set.rb:182:in install' /Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:214:in
install_gem'
/Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:230:in block in install_gems' /Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:223:in
each'
/Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:223:in install_gems' /Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:169:in
execute'
/Library/Ruby/Site/2.6.0/rubygems/command.rb:323:in invoke_with_build_args' /Library/Ruby/Site/2.6.0/rubygems/command_manager.rb:251:in
invoke_command'
/Library/Ruby/Site/2.6.0/rubygems/command_manager.rb:191:in process_args' /Library/Ruby/Site/2.6.0/rubygems/command_manager.rb:149:in
run'
/Library/Ruby/Site/2.6.0/rubygems/gem_runner.rb:51:in run' /usr/bin/gem:21:in
I deleted those directories by using the below command :-
sudo rm -rf \ /Library/Ruby/Gems/2.6.0/{build_info,cache,doc,extensions,gems} \ /Library/Ruby/Gems/2.6.0/specifications/*.gemspec \ /Library/Ruby/Site
then installed cocopods using sudo gem install -n /usr/local/bin cocoapods , and cocoapods installed successfully for me.
please @Vinaybandarapu instruction it is worked for me great........! thanks man.....:)
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.