Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: While executing gem ... (Gem::FilePermissionError) #190

Open
RaziPour1993 opened this issue Nov 21, 2018 · 3 comments
Open

ERROR: While executing gem ... (Gem::FilePermissionError) #190

RaziPour1993 opened this issue Nov 21, 2018 · 3 comments

Comments

@RaziPour1993
Copy link

ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.

@ashfurrow
Copy link
Collaborator

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!).

@Vinaybandarapu
Copy link

/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.

@Venkatesh63740
Copy link

please @Vinaybandarapu instruction it is worked for me great........! thanks man.....:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants