Circle CI で CocoaPods のエラー発生

Circle CI で iOS アプリをビルド中に、以下のエラーが表示される様になりました。

cd "."
bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs 4 --retry 3
The git source https://github.com/CocoaPods/CocoaPods.git is not yet checked
out. Please run `bundle install` before trying to start your application
Fetching https://github.com/CocoaPods/CocoaPods.git
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Your Gemfile requires gems that depend depend on each other, creating an
infinite loop. Please remove either gem 'cocoapods-deintegrate' or gem

cd "."
bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs 4 --retry 3
 returned exit code 21

'cocoapods' and try again. Action failed: Run bundler

Gemfile を確認して、

source 'https://rubygems.org'
gem 'cocoapods', :git => 'https://github.com/CocoaPods/CocoaPods.git'
gem 'fastlane'

となっていたのですが cocoapods の行を削除したらビルドが通りました。