Sagar Kachhadiya
Sagar Kachhadiya

Reputation: 1066

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

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

in mac os catalina

Upvotes: 41

Views: 23287

Answers (7)

Sushant Paudel
Sushant Paudel

Reputation: 106

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

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

Upvotes: 0

Dharmbir Singh
Dharmbir Singh

Reputation: 17535

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

Upvotes: 22

Yoku
Yoku

Reputation: 307

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"

Upvotes: 1

Dave
Dave

Reputation: 81

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!

Upvotes: 8

Mujahed Ansari
Mujahed Ansari

Reputation: 469

I solved it like this

1) cd ~/.cocoapods

2) rm -r repos

3) sudo gem install cocoapods

4) pod install

Upvotes: 0

Imran
Imran

Reputation: 2543

Run the following command in terminal

sudo gem install cocoapods

For more details follow this link.

https://github.com/CocoaPods

Upvotes: 8

Zeeshan Ansari
Zeeshan Ansari

Reputation: 10798

You can fix it by running

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

Upvotes: 121

Related Questions