Error when installing cocoapods on mavericks

Error when installing cocoapods on mavericks

When following the instructions to install cocoapods the following error occured:

Building native extensions.  This could take a while…

ERROR:  Error installing cocoapods: ERROR: Failed to build gem native extension.

Command line tools

The solution was to install the command line tools with this command:

xcode-select –install

and then again run: sudo gem install cocoapods