最近一次gem install cocoapods --pre for CocoaPods 0.38.0.beta.2
出现以下错误:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
做了以下操作:
1. sudo gem uninstall cocoapods
2.选择你想要的versions
3.sudo gem install cocoapods
ok, it works, have fun!
----------------------------------------------------------------
now, cocoapods 1.0.0
1. sudo gem install cocoapods
2. ERROR:While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj
3. sudo gem install -n /usr/local/bin cocoapods
4. pod --version
5. 1.0.0 perfect
----------------------------------------------------------------
CocoaPods升级到1.0.0 版本之后必须配置target
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'AFNetworking', '~> 2.6'
pod 'ORStackView', '~> 3.0'
pod 'SwiftyJSON', '~> 2.3'
end
----------------------------------------------------------------
ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/update_rubygems
sudo gem update -n /usr/local/bin --system
or cocoapods install
sudo gem install -n /usr/local/bin cocoapods--pre
网友评论