Onichan
Onichan

Reputation: 4526

CocoaPods No such file or directory

I just installed CocoaPods and cannot seem to run any commands.

All the follow commands give the same error:

$ pod init
$ pod setup
$ pod install

Error:

 -bash: /Users/emma/.rvm/rubies/ruby-2.2.0/bin/pod: No such file or directory

Upvotes: 0

Views: 929

Answers (1)

Jasper
Jasper

Reputation: 7107

Correct way to install Cocoapods is with the following Terminal commands (in this order):

sudo gem update --system

sudo gem install cocoapods

pod setup

cd ~/Path/To/Folder/Containing/YourApp

pod init

After pod init you should be able to open and edit the podfile

open -a Xcode Podfile

And add your pod to it (f.e.:)

pod 'AFNetworking', '2.2.1'

to install the added pods run command pod install

After the installation of the pods, use *.xcworkspace instead of *.xcodeproj

A clear tutorial can be found on the good 'ol RayWenderlich website.

Upvotes: 1

Related Questions