본문 바로가기

개발

cocoapod pod install시 `find_spec_for_exe': can't find gem cocoapods

728x90
pod install

/Library/Ruby/Site/2.0.0/rubygems.rb:250:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException)

from /Library/Ruby/Site/2.0.0/rubygems.rb:278:in `activate_bin_path'

from /usr/local/bin/pod:22:in `<main>'

 

어느날 pod install 을 하려 했더니 이런 에러가 나온다면 

코코아팟을 삭제 한 후 재 설치 하는것이 도움이 될 수 있습니다.

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

 

만약 이 이후에도 해결이 되지 않고 

ERROR: While executing gem ... (Gem::CommandLineError) Please specify at least one gem name (e.g. gem build GEMNAME)

이와 같은 에러가 나온다면 

gem install -n /usr/local/bin cocoapods

이 명령 구문을 사용 해 볼 수 있습니다.