1:Mac升级10.10后,执行pod install出错如下

QTX-Will-mini:NewHishop willbin$ pod install
[!] Unable to load a specification for the plugin `/Library/Ruby/Gems/2.0.0/gems/cocoapods-try-release-fix-0.1.2`
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/user_interface/error_report.rb:13:in `report': incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError)
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/command.rb:63:in `report_error'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:300:in `handle_exception'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:274:in `rescue in run'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:264:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/command.rb:50:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/bin/pod:33:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'

  解决方案:卸载0.1.2版本, 再安装最新版本

QTX-Will-mini:NewHishop willbin$ sudo gem uninstall cocoapods-try-release-fix
Password: Select gem to uninstall:
1. cocoapods-try-release-fix-0.1.1
2. cocoapods-try-release-fix-0.1.2
3. All versions > 3 Successfully uninstalled cocoapods-try-release-fix-0.1.1
Successfully uninstalled cocoapods-try-release-fix-0.1.2 QTX-Will-mini:NewHishop willbin$ sudo gem install cocoapods
Successfully installed cocoapods-0.34.4
Parsing documentation for cocoapods-0.34.4
1 gem installed

  

2:安装成功后, 再执行 pod install 还是出错, 如下

QTX-Will-mini:NewHishop willbin$ pod install
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/user_interface/error_report.rb:13:in `report': incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError)
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/command.rb:63:in `report_error'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:300:in `handle_exception'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:274:in `rescue in run'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:264:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/command.rb:50:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/bin/pod:33:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'

  解决方案: podfile格式变化了. 要用新格式.

3: podfile格式变化

以前的podfile格式如下

platform :ios, '7.0'
pod 'AFNetworking'

以下是官网的podfile介绍

http://guides.cocoapods.org/syntax/podfile.html

http://guides.cocoapods.org/using/the-podfile.html

The Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects. The Podfile always creates an implicit target, named default, which links to the first target of the user project.

A podfile can be very simple:

source 'https://github.com/CocoaPods/Specs.git'
pod 'AFNetworking', '~> 1.0'

  

An example of a more complex podfile can be:

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '6.0'
inhibit_all_warnings! xcodeproj 'MyProject' pod 'ObjectiveSugar', '~> 0.5' target :test do
pod 'OCMock', '~> 2.0.1'
end post_install do |installer|
installer.project.targets.each do |target|
puts "#{target.name}"
end
end

  

ps:podfile中尤其要注意标点符号.

Mac OS X 10.10(yosemite)更新后,cocoapods出错, 及cocoapods更新至0.34后, 错误情况整理的更多相关文章

  1. vmware 12中安装MAC OS X Lion 10.7

    下载并安装vmware.    下载并安装MAC补丁.    创建虚拟机.    设置ISO文件.    开启虚拟机.    安装vmware tools. 1. 下载并安装vmware.我是直接在腾 ...

  2. [MAC]OS X Mavericks 10.9.5 / 10.10.2 VMWare vmdk镜像,解压就能用!

    用起来是比VirtualBox好使很多: 1.鼠标很灵敏,不像Vbox那么飘 2.显卡有驱动,VM可以配置显示器尺寸,完美支持网络.语音.视频,直接搞全屏,还能看电影 3.USB设备支持热插拔 4.支 ...

  3. Mac OS X Mavericks or Yosemite 安装Nginx、PHP、Mysql、phpMyAdmin

    翻译:http://blog.frd.mn/install-nginx-php-fpm-mysql-and-phpmyadmin-on-os-x-mavericks-using-homebrew/ 最 ...

  4. 解决Mac OS X 升级10.10(Yosemite)后ADT(Eclipse)无法找到真机

    升级Yosemite之后继续开发Android,发现当编译版本高于设备版本的时候设备选择器找不到真机了,WTF!难道要改低版本SDK开发不成?臣妾做不到啊! 后来捣鼓了一阵,发现解决方案有两个: 1. ...

  5. MAC OS升级到10.11(OS X EICAPTION)之后CocoaPods不能正常使用的问题解决

    昨晚回家之后开始升级系统到10.11,下载了一整个晚上之后终于在早上下载完毕,早上带到公司,想查一个第三方库的时候却遇到了问题: guoyufudeMacBook-Pro:~ GuoYufu$ pod ...

  6. Mac OS 升级到10.12问题 Android ADT 下载SDK问题 https://dl-ssl.google.com refused...

    缘由: 更新sdk,遇到了更新下载失败问题: Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml Fetch ...

  7. virtualbox 安装 mac os x lion 10.7实现全屏显示!

    1. 启动Virtual Box虚拟机,在虚拟机里编辑 /Library/Preferences/SystemConfiguration/com.apple.Boot.plist,找到 <dic ...

  8. Mac OS X 10.10 Yosemite下安装java、jdk、mysql、maven、idea

    Mac OS X Yosemite已经在2014年10月17日正式发布了. 作为一个java开发者,尝鲜第一时间安装了最新版本. 和之前的OS X系统还是有很多不同的.下面主要在java开发环境方面做 ...

  9. Mac OS X Yosemite 10.10 配置 Apache+PHP 教程注意事项

    刚更新到了 Mac OS X Yosemite 10.10,发现运行Apache出现了一些问题,修正一下! 教程基于 Mac OS X Mavericks 10.9.X,移步:Mac OS X Mav ...

随机推荐

  1. 306573704 Char型和string型字符串比较整理(转)

    1.赋值 char赋值: char ch1[] = "give me"; char ch2[] = "a cup"; strcpy(ch1,ch2); cout ...

  2. sgu 102 Coprimes

    太水了, 我都不忍心发题解, 但毕竟是sgu上一道题, 我试试能不能一直这么写下去,就是求phi,上代码 #include <cstdio> #include <cstring> ...

  3. OpenJudge/Poj 2027 No Brainer

    1.链接地址: http://bailian.openjudge.cn/practice/2027 http://poj.org/problem?id=2027 2.题目: 总Time Limit: ...

  4. 责任链模式(Chain of Responsibility Pattern)

    责任链模式:可以为某个请求创建一个对象链.每个对象依序检查此请求,并对其处理,或者把它传给链中的下一个对象. 责任链上的对象负责处理请求,客户只需要将请求发送到责任链上即可,无需关心处理的细节和请求的 ...

  5. centos 安装php ide (eclipse + php 插件)

    1.检查更新并安装eclipse  yum check-update  yum install eclipse*此时的 eclipse 已经安装好了,默认是在/usr/lib/下的,可以通过cd /u ...

  6. NUnit单元测试

    单元测试对程序员来说是非常重要的一门技术,但是在实际编程中却往往被程序员所忽视.微软的VS开发工具为我们提供了强大的单元测试环境,在VS当中可以直接对类库项目进行测试,极大的方便了程序员的自我纠错能力 ...

  7. margin系列之keyword auto

    本系列摘自  px; margin: auto; /* 或者 margin: 0 auto; */ } HTML: <div id="demo"> <p>恩 ...

  8. CentOS 最小化安装后安装桌面

    通过yum的方式安装: yum groupinstall -y   "Desktop"   "Desktop Platform"   "Desktop ...

  9. 大话F#和C#:是否会重蹈C#失败的覆辙?

    F#.net 出来有些年头儿了,将从 VS 2010 起在 .net framework 平台上以“一等公民”身份粉墨登场的它,将会给计算机科技与软件工业带来哪些悲喜剧呢? F# 将扮演一个什么角色? ...

  10. Python原型模式

    如果想根据现有对象复制出新的对象并对其修改,可以考虑原型模式(Prototype Pattern) class Point: __slots__ = ("x", "y&q ...