Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode: 'pod init' failing with ruby json "incompatible library version" error

Tags:

json

xcode

ios

ruby

I created a new XCode project and ran pod init at where that project exitsts. I got the following error.

/Users/xxx/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require': incompatible library version - /Users/xxx/.rvm/gems/ruby-2.3.0/gems/json-2.0.2/lib/json/ext/parser.bundle (fatal)

I didn't make any modification to my project. Where is the error coming from? It seems like it's coming from ruby, but it's weird to have a ruby error on a XCode project. Does anyone know how to solve this? Thanks,

like image 609
alpaca Avatar asked Jan 06 '23 03:01

alpaca


1 Answers

Seems like an issue with your Cocoapods installation, try uninstalling and reinstalling it.

Uninstalling

gem uninstall cocoapods
gem uninstall cocoapods-core
gem uninstall cocoapods-downloader

Reinstalling

gem install cocoapods
like image 162
nburk Avatar answered Jan 07 '23 18:01

nburk