Reputation: 1066
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
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
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
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
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
Reputation: 469
I solved it like this
1) cd ~/.cocoapods
2) rm -r repos
3) sudo gem install cocoapods
4) pod install
Upvotes: 0
Reputation: 2543
Run the following command in terminal
sudo gem install cocoapods
For more details follow this link.
Upvotes: 8
Reputation: 10798
You can fix it by running
sudo gem install -n /usr/local/bin cocoapods
Upvotes: 121