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

时间:2015-04-29 13:17:54

标签: ios objective-c cocoa cocoapods

你好我对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>'

我还是新手,所以我不确定我哪里出错我在网上查了一下,发现了类似的问题,但没有一个问题解决了。终端中的所有命令都在下面显示我到目前为止所做的事情我认为我正确设置了可可豆荚,问题在于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$ 

PodFile:

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

2 个答案:

答案 0 :(得分:1)

将您的library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_unsigned.ALL; entity Circuit is Port ( CLK : in STD_LOGIC := '0'; CLR : in STD_LOGIC; Q : out STD_LOGIC_VECTOR (5 downto 0)); end Circuit; architecture Behavioral of Circuit is signal s: STD_LOGIC_VECTOR := "000000"; begin process (CLK, CLR) begin if rising_edge(CLK) then if CLR = '1' OR s = "111011" then s <= "000000"; else s <= s+1; end if; end if; end process; Q <= s; end Behavioral; 重新格式化为

将&#34;复制/粘贴到&#34;示例如下或退格您的'并手动输入

'

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

然后运行您的pod安装/更新

答案 1 :(得分: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

在此之后打开项目文件夹

上的工作区