红宝石 – 无法上班CocoaPods和Yosemite

前端之家收集整理的这篇文章主要介绍了红宝石 – 无法上班CocoaPods和Yosemite前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我已经尝试过这个步骤:

>打开Xcode 6打开首选项
>单击“位置”选项卡
>将命令行工具版本更改为Xcode 6.0
>卸载cocoapods
> a. $sudo gem uninstall cocoapods安装xcodeproj
> a. $sudo gem install
> xcodeproj安装cocoapods
> a. $sudo gem install cocoapods
>运行pod –version以验证它是否有效

但是当我进行pod安装或pod –version时,我仍然会这样做:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/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/ext.rb:6:in `rescue in <top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/ext.rb:3:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/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 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/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 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/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 update –system
>卸载xcodeproj

sudo gem uninstall xcodeproj
>确保选择所有版本
>卸载Cocoapods

sudo gem uninstall cocoapods
>安装xcodeproj

sudo gem install xcodeproj
>安装cocoapods

sudo gem安装cocoapods
>跑

pod – 版本测试.

原文链接:https://www.f2er.com/ruby/274059.html

猜你在找的Ruby相关文章