I just update to beta version , when I run pod update , error appear
Cocoapods
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.beta.2/lib/cocoapods.rb
OS
macOS Sierra
ruby version
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
gem version
2.0.14.1
Error message
/usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'json' (>= 1.7.7, ~> 1.7) - did find: [json-2.0.2] (Gem::LoadError)
Checked in 'GEM_PATH=/Users/StephenChen/.gem/ruby/2.3.0:/usr/local/lib/ruby/gems/2.3.0:/usr/local/Cellar/ruby/2.3.3/lib/ruby/gems/2.3.0', execute `gem env` for more information
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1439:in `block in activate_dependencies'
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1428:in `each'
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1428:in `activate_dependencies'
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1410:in `activate'
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1442:in `block in activate_dependencies'
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1428:in `each'
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1428:in `activate_dependencies'
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1410:in `activate'
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1442:in `block in activate_dependencies'
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1428:in `each'
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1428:in `activate_dependencies'
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1410:in `activate'
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:68:in `block in gem'
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:67:in `synchronize'
from /usr/local/Cellar/ruby/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:67:in `gem'
from /usr/local/bin/pod:22:in `<main>'
run gem evn
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.14.1
- RUBY VERSION: 2.0.0 (2015-12-16 patchlevel 648) [universal.x86_64-darwin16]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-16
- GEM PATHS:
- /Library/Ruby/Gems/2.0.0
- /Users/StephenChen/.gem/ruby/2.0.0
- /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
I know probably the to_specs version could not find 'json' (>= 1.7.7, ~> 1.7) , but I have no idea how to change and what is correct way to fix , can someone give me some hints ?
Hi @5SMNOONMS5! Do you have the same issue if you install a more recent version of CocoaPods, like 1.1.1?
Thank you @benasher44
After sudo gem install cocoapods
solve the problem
cocoapods version
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods.rb
@5SMNOONMS5 great I'm glad you got it resolved, and we appreciate you sharing the solution. Have a great day!
Most helpful comment
Thank you @benasher44
After
sudo gem install cocoapods
solve the problemcocoapods version
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods.rb