美文网首页
gem install cocoapods --pre出错

gem install cocoapods --pre出错

作者: RAINYE | 来源:发表于2015-08-22 16:49 被阅读0次

    最近一次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

    相关文章

      网友评论

          本文标题:gem install cocoapods --pre出错

          本文链接:https://www.haomeiwen.com/subject/aopztttx.html