Reputation: 37349
I am trying to install the latest CocoaPods (which is 0.36.1) but it shows me the following error.
$ gem install cocoapods
ERROR: Could not find a valid gem 'xcodeproj' (~> 0.23.1) in any repository
Btw, in the answered questions some are proposed using sudo get install cocoapods
. You do need sudo
indeed if you are using the system-wide ruby executable. I am using rbenv
for my ruby management, it is installed locally for the user and does not need sudo
.
The gem install cocoapods
command worked the following day. Mystery.
Upvotes: 2
Views: 2988
Reputation: 732
Next time that occurs, run the command gem sources -u
to update your source cache and try again.
Upvotes: 0
Reputation: 179
If the automatic downloading of xcodeproj 0.23 fails, you can fetch the gem file manually:
gem fetch xcodeproj -v 0.23.0
This will put the .gem file in your current directory.
Then you can install the gem:
gem install xcodeproj -v 0.23.0
If the xcodeproj gem installs successfully, you can continue with your install of cocoapods as usual:
gem install cocoapods
Upvotes: 0
Reputation: 530
I think you need to update your gems repo.
try issuing "gem update" in a terminal. Can't remenber if you need sudo.
Try that, and then try installing xcodeproj and cocoapods again.
Regards Steffen
Upvotes: 0
Reputation: 373
I think you could try an older version of the pods.
I tried: sudo gem install cocoapods -v 0.34.0
and this worked for me.
Upvotes: 4
Reputation: 3908
For your error you should do like this
i) $ sudo gem install xcodeproj
ii) $ sudo gem install cocoapods
for pod version you can verify pod --version
Upvotes: 0