Cannot update Cocoapods (3.0 EAP)

I have CocoaPods 0.32.1 installed on my Mac.  However, AppCode 3.0 EAP only detects version 0.29.  When I try to update CocoaPods through AppCode's preferences for CocoaPods, I get this error message:
     Can't Update CocoaPods
     Following gems were not installed:
     cocoapods (0.32.1): While executing gem... (Errno::EACCES)
     Permission denied - /Library/Ruby/Gems/2.0.0/cache/nap-0.7.0.gem

I have to use sudo to install CocoaPods manually in order to get around such permission problems, and there doesn't seem to be a way to use sudo with AppCode.  Is there any way to get around this when installing via AppCode, or a way to get AppCode to recognize my system's updated CocoaPods framework?

Thank you.


Are you using something like rbenv or RVM? What does 'which ruby' say?


which ruby reports version 2.0.0

Forgive my ignorance, but I'm not an experienced Ruby developer (I've only read about it a bit), so I'm not sure what your question is about rbenv and RVM.  I'm not using rbenv or RVM during the installation, although they're installed with my ruby environment.  I've directly followed the instructions on CocoPods' web site for installing CocoaPods, typing 'sudo gem install cocoapods' in the terminal.


No problem about being unfamiliar with Ruby, it's our job to make using CocoaPods easier for you.

Did you configured Ruby SDK in AppCode's settings to point the same path `which ruby` shows you?


> Did you configured Ruby SDK in AppCode's settings to point the same path `which ruby` shows you?

The path shown by 'which ruby' was within a hidden .rvm folder within my Library folder.  I can't point to that path since the folder doesn't show up in AppCode's path selection dialog. I'm also confused by the fact that 'which ruby' lists ruby-2.0.0-p0, but after setting the Ruby SDK in AppCode, AppCode lists the ruby version as ruby-2.0.0-p451.

Here's a couple of strange things that have happened:

1. I tried updating CocoaPods via AppCode on my second Mac (an iMac).  It had precisely the same output from 'which ruby', but CocoaPods 0.32.1 installed without any problems!

2. AppCode is now locking up on the first Mac (a MacBook Pro) when I try to open the CocoaPods preference pane.  I'm going to reinstall AppCode and try again.


AppCode's working again after the reinstall.  CocoaPods still won't update on the MacBook Pro.  In summary:  With the same version and location of Ruby (according to both 'which ruby' and 'ruby -v'), CocoaPods updates on my iMac, but not my MacBook Pro.  I hate to ask, but could this possibly be a permissions problem for the ruby installation on my MacBook Pro?


After repairing permissons on my MacBook Pro and rebooting, I was able to update CocoaPods through AppCode.  Problem solved!


Glad to hear that.

As for different versions - you have several Rubies installed. Default Ruby in your Terminal is one from RVM. In AppCode you've selected version bundled with OS X. They have separate folders for gems and other things, that's why you see different CocoaPods versions from different places.


BTW you can turn hidden files on in OS X file dialog by pressing Cmd + Shift + Period while this dialog is focused.


Thank you for your help.  I'll search online to see if it's at all possible to consolidate my Ruby versions and have only one version of Ruby on my Mac.


Please sign in to leave a comment.