Cocoa Pods 安装 RestKit 时不兼容的字符编码

Cocoa Pods Incompatible Character Encoding, When Installing RestKit

嗨,我是 cocoaPods 的新手,这是我第一次尝试设置它,我试图将 RestKit 添加到我的项目中,但是当我 运行 pod install 我收到下面的错误。

/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.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.36.4/lib/cocoapods/command.rb:59:in `report_error'
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:374:in `handle_exception'
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:315:in `rescue in run'
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:303:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/command.rb:46:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/bin/pod:44:in `<top (required)>'
    from /usr/bin/pod:23:in `load'
    from /usr/bin/pod:23:in `<main>'

我对此还是很陌生,所以我不确定哪里出了问题我在网上查了一下,发现了类似的问题,但 none 问题已经解决了。我在终端中的所有命令都在下面显示我到目前为止所做的事情我想我正确设置了 cocoa pods 并且问题出在 pod 文件上但我不确定。 pod 文件的内容也在下面。感谢您的帮助。

航站楼:

CocoaPods 0.37.0.rc.1 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Setup completed
Some-MacBook-Pro:Articles Some$ touch podfile
Some-MacBook-Pro:Articles Some$ open -a TextEdit PodFile
Some-MacBook-Pro:Articles Some$ pod install
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.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.36.4/lib/cocoapods/command.rb:59:in `report_error'
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:374:in `handle_exception'
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:315:in `rescue in run'
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:303:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/command.rb:46:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/bin/pod:44:in `<top (required)>'
    from /usr/bin/pod:23:in `load'
    from /usr/bin/pod:23:in `<main>'
Some-MacBook-Pro:Articles Some$ open a- TextEdit PodFile
The files /Users/Some/Desktop/RW-Tutorials/Articles/a- and /Users/Some/Desktop/RW-Tutorials/Articles/TextEdit do not exist.
Some-MacBook-Pro:Articles Some$ 

播客文件:

platform :iOS, ‘8.0’
pod ‘RestKit’, ’~> 0.20.0’

终端并输入以下命令:

sudo gem update --system

接下来,您需要安装CocoaPods。在终端中键入此命令:

sudo gem install cocoapods

在终端中输入此命令以完成 CocoaPods 的设置:

pod setup

打开终端并使用 cd 命令导航到包含您的项目的目录:

cd ~/Path/To/Folder/Containing/yourprojectName

接下来输入此命令:

pod init

键入此命令以打开 Podfile 进行编辑:

open -a Xcode Podfile

将这些文件添加到您的 pod 文件

platform :iOS, '8.0'
pod 'RestKit', '~> 0.20.0'

然后需要输入以下内容完成

pod install

在此之后打开项目文件夹中的工作区

将您的 重新格式化为 '

copy/paste 下面的 "to" 示例或退格 并手动键入 '

platform :iOS, ‘8.0’
pod ‘RestKit’, ’~> 0.20.0’

platform :iOS, '8.0'
pod 'RestKit', '~> 0.20.0'

然后 运行 你的广告连播 install/update