CocoaPods / CocoaPods

The Cocoa Dependency Manager.
https://cocoapods.org/
Other
14.47k stars 2.62k forks source link

facing issue while pod install #12385

Open TassainRasool opened 1 month ago

TassainRasool commented 1 month ago

getting this error message on pod install in my react-native project

Stack


   CocoaPods : 1.15.2
        Ruby : ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [arm64-darwin22]
    RubyGems : 3.1.6
        Host : macOS 13.5.1 (22G90)
       Xcode : 15.0 (15A240d)
         Git : git version 2.43.0
Ruby lib dir : /Users/user/.rbenv/versions/2.7.8/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Errno::ENOTEMPTY - Directory not empty @ dir_s_rmdir - /Users/user/Library/Caches/CocoaPods/Pods
/Users/user/.rbenv/versions/2.7.8/lib/ruby/2.7.0/fileutils.rb:1460:in `rmdir'
/Users/user/.rbenv/versions/2.7.8/lib/ruby/2.7.0/fileutils.rb:1460:in `block in remove_dir1'
/Users/user/.rbenv/versions/2.7.8/lib/ruby/2.7.0/fileutils.rb:1471:in `platform_support'
/Users/user/.rbenv/versions/2.7.8/lib/ruby/2.7.0/fileutils.rb:1459:in `remove_dir1'
/Users/user/.rbenv/versions/2.7.8/lib/ruby/2.7.0/fileutils.rb:1452:in `remove'
/Users/user/.rbenv/versions/2.7.8/lib/ruby/2.7.0/fileutils.rb:780:in `block in remove_entry'
/Users/user/.rbenv/versions/2.7.8/lib/ruby/2.7.0/fileutils.rb:1509:in `ensure in postorder_traverse'
/Users/user/.rbenv/versions/2.7.8/lib/ruby/2.7.0/fileutils.rb:1509:in `postorder_traverse'
/Users/user/.rbenv/versions/2.7.8/lib/ruby/2.7.0/fileutils.rb:778:in `remove_entry'
/Users/user/.rbenv/versions/2.7.8/lib/ruby/2.7.0/fileutils.rb:630:in `block in rm_r'
/Users/user/.rbenv/versions/2.7.8/lib/ruby/2.7.0/fileutils.rb:626:in `each'
/Users/user/.rbenv/versions/2.7.8/lib/ruby/2.7.0/fileutils.rb:626:in `rm_r'
/Users/user/.rbenv/versions/2.7.8/lib/ruby/2.7.0/pathname.rb:589:in `rmtree'
lmarcosss commented 1 month ago

I found this url on stack overflow and resolve my problem! url ruby problem

Using this:

Check that PATH contains $HOME/.rbenv/shims and $HOME/.rbenv/bin

$ env | grep PATH

Also check that you have the following in your ~/.bash_profile if using bash or ~/.zshenv if using zsh

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
TassainRasool commented 1 month ago

@lmarcosss tried this but didn't work foe me.

monstaro commented 1 month ago

Hey @TassainRasool try removing your pods cache, here's what worked for me:

rm -rf /Users/codysmith/Library/Caches/CocoaPods/Pods