While developing software for iOS is usually a pleasant enough activity, setting up the whole development environment may be at times slightly frustrating due to some unexpected behavior in the software, and in the tools involved.

This week I wanted to add some new features to an existing project, so I downloaded the source from the git repository, and since I use CocoaPods, I tried to add the necessary pods to my project:

pod install

And what did I get? I got this:

-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory

When I did update my Mac I managed to somehow break CocoaPods (issue documented here).

Thankfully as the linked documentation states, one can solve that issue by reinstalling CocoaPods:

sudo gem install cocoapods

That´s it – problem solved 🙂

Having solved this problem I ran into a different CocoaPods issue; I am using realm in that project, and I was getting this error:

object_schema.hpp file not found

Once again this was a reported issue, and the suggested solution worked like a charm:

rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
pod install
Advertisements