Reputation: 389
I am taking a course from Udemy for iOS 10 (swift 3) programming. An app works with Firebase and Firebase requires a pod file. In the course, it said to type the following commands in Terminal to install a pod:
cd Desktop/
ln
cd dc-social
ln
pod init
But when I run the pod init command, it gives me an error:
-bash: pod: command not found
I am running macOS Sierra (the final release). What should I do? Any help would be appreciated :) Thanks!
Upvotes: 0
Views: 13089
Reputation: 101
In my case I was unable to install with gem (sudo gem install cocoapods
) but successfully installed with homebrew:
brew install cocoapods
Upvotes: 4
Reputation: 1110
Maybe a little late, but often you can't do a sudo when your not an admin. Then do this, open the terminal. Change to an admin user with
su 'theadminName'
Type the admin password. Then do
sudo gem install cocoapods
Upvotes: 0
Reputation: 1
I am in the same course and got the same problem. I found out that we have to install cocapods
before we run that command. So do the following in your terminal (it will ask for your password):
sudo gem install cocoapods
This will install some stuff and then you will be able to run the "init pod command".
Upvotes: 0
Reputation: 1873
try to run this first (it will ask your admin password)
sudo gem install -n /usr/local/bin cocoapods
Upvotes: 8