Reputation: 2281
I had this problem "https://stackoverflow.com/questions/19612185/unable-to-install-cocoapods-gem-from-rubygems-org-bad-response-backend-read-e" and as one of the solutions said I tried to remove/add rubygem sources. It was removed without problem, but when I tried to add it back it's giving me an error. Here's my action on terminal and response:
$ gem sources --add https://rubygems.org/
Error fetching https://rubygems.org/:
server did not return a valid file (https://rubygems.org/specs.4.8.gz)
Does anyone know what is the problem?
Upvotes: 1
Views: 1183
Reputation: 897
Here is Easy Steps for installing Ruby in your system to help to install Cocoapods in your machine, I solved the same issue with being below mentioned steps.
- Install command line tools using the command
xcode-select --install
- Install Homebrew by
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install Ruby using homebrew
brew install ruby
- Check Ruby version
ruby -v
- Install Ruby
gem source -a http://rubygems.org/
- gem install cocoa pods
sudo gem install cocoapods
sudo gem install -n /usr/local/bin cocoapods
- Go to below folder
cd ~/.cocoapods/repos
- Run the below command
git clone https://github.com/CocoaPods/Specs.git master
- Go to the directory where Podfile is present and run
pod install
Happy Coding😊
Upvotes: 2
Reputation: 441
Steps: 1. sudo gem install cocoapods 2. pod install 3. pod update
ensure that you are connected to internet. Your system is unable to find the latest version of gems, required by pods
Upvotes: 1