Im trying to install CocoaPods using terminal. In their official website it is written:

installing it is as easy as running the following commands in the terminal:
$ [sudo] gem install cocoapods
$ pod setup

But when i enter the first line in terminal i get the following error:

-bash: $: command not found

What can I do with it, I tried looking in the web but since I'm a noob with terminal I couldn't really figure out what to to do.


the $ in the lines shown is meant to represent the command prompt of the terminal.

enter the commands without the $ preceding..also the [sudo] part represents the requirement to use sudo or not (you will probably need to) so this comes down to entering

sudo gem install cocoapods
pod setup

before embarking further on your exploration of the command prompt you might find it helpful to have a look through some of the resources on this superuser question


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .