1
votes

When I try to install Cocoapods or update gem on Mavericks (10.9.1) I keep getting the following and I am unable to find a resolution. Here's the error:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:205:in parse': (<unknown>): could not find expected ':' while scanning a simple key at line 2 column 1 (Psych::SyntaxError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:205:in parse_stream' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:153:in parse' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:129:in load' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/config_file.rb:318:in load_file' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/config_file.rb:191:in initialize' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/gem_runner.rb:66:in new' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/gem_runner.rb:66:in do_configuration' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/gem_runner.rb:46:in run' from /usr/bin/gem:21:in'

1

1 Answers

2
votes

It looks like incompatibility between your system ruby version and the version of cocoapods you are trying to install.

I highly recommend that you install rvm to handle ruby versioning on your mac.

Once rvm is installed try running running:

$ gem install cocoapods

rvm can handle multiple ruby versions that are per user on your system. If you've been using sudo everytime you run your ruby commands rvm is also your answer.