Pod install not working in react-native mac os catalina 10.15

Viewed 19240

Error: System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory

in mac os catalina

7 Answers

You can fix it by running

sudo gem install -n /usr/local/bin cocoapods 

I face the same problem on Catalina and tried these 2 steps hopefully it will work

brew install cocoapods --build-from-source

brew link --overwrite cocoapods

This solution worked for me.

1) Go to Xcode preferences -> Locations 'tab'. See image for Locations 'tab'.

2) Check the Command Line Tools section. If it's blank, make sure your current command line tools is selected. See image for Command Line Tools Section.

3) Run sudo gem install -n /usr/local/bin cocoapods

It worked like a charm for me. Hope it does for someone else too. Happy coding!

None of the suggestions worked for me. The issue could only be resolved by adding the correct Ruby path in the profile such as:

export PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/2.6.0/bin/:$PATH"

I solved it like this

1) cd ~/.cocoapods

2) rm -r repos

3) sudo gem install cocoapods

4) pod install

Maybe try using the cocoapods installed through homebrew. It works for me. – Snowfish

This comment by Snowfish on the question helped me using cocoapods.

Related