エラーメッセージ

$ pod install
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir': Permission denied - /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14 (Errno::EACCES)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `fu_mkdir'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:219:in `block (2 levels) in mkdir_p'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `reverse_each'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `block in mkdir_p'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `each'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `mkdir_p'
	from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:210:in `write_gem_make_out'
	from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:132:in `build_error'
	from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:171:in `rescue in build_extension'
	from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:156:in `build_extension'
	from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
	from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:195:in `each'
	from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:195:in `build_extensions'
	from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:1436:in `block in build_extensions'
	from /Library/Ruby/Site/2.0.0/rubygems/user_interaction.rb:45:in `use_ui'
	from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:1434:in `build_extensions'
	from /Library/Ruby/Site/2.0.0/rubygems/stub_specification.rb:60:in `build_extensions'
	from /Library/Ruby/Site/2.0.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
	from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:925:in `block in find_inactive_by_path'
	from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:924:in `each'
	from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:924:in `find'
	from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:924:in `find_inactive_by_path'
	from /Library/Ruby/Site/2.0.0/rubygems.rb:185:in `try_activate'
	from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
	from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
	from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/ext.rb:4:in `<top (required)>'
	from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj.rb:30:in `<top (required)>'
	from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.33.1/lib/cocoapods.rb:2:in `<top (required)>'
	from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.33.1/bin/pod:32:in `<top (required)>'
	from /usr/bin/pod:23:in `load'
	from /usr/bin/pod:23:in `<main>'

解決法

これでなおった。

$ sudo gem uninstall cocoapods && sudo gem install cocoapods
Pocket