running pod set up gives me "bad interpreter: No such file or directory"

user3670235 picture user3670235 · Jul 16, 2015 · Viewed 51.4k times · Source

recently tried to do pod setup and i get this:

-bash: /usr/local/bin/pod: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory

I followed Ray Wenderlich's guide to install cocoapods and i get this issue so i have no idea what is going on.

Answer

Torre Lasley picture Torre Lasley · Sep 22, 2017

I encountered this problem when upgrading to Mac OS High Sierra.

This was my fix:

sudo gem install cocoapods

I found this answer on the CocoaPods issue list on Github.