无法安装podfile

时间:2015-02-12 18:41:38

标签: ios cocoapods

我已经安装了Cocoapods,运行pod设置,创建了一个pod文件,然后当我尝试安装它时,会出现以下错误。

    fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/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.35.0/lib/cocoapods/command.rb:58: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.35.0/lib/cocoapods/command.rb:45:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
    from /usr/bin/pod:23:in `load'
    from /usr/bin/pod:23:in `<main>'

这就是我的podfile中的内容

platform :ios, '7.0'
pod ‘pop’, ‘~> 1.0′

我已经卸载了可可豆荚并重新安装但没有运气。甚至尝试了以下解决方案,该解决方案适用于其他有安装pod问题的人,但无济于事。

$ sudo rm -fr ~/.cocoapods/repos/master
$ pod setup 

有什么想法吗?

由于

2 个答案:

答案 0 :(得分:2)

当我用Textedit编辑我的Podfile时发生这种情况,而不是正常的单引号,有反复标记即:

我得到了这个:' 而不是:&#39;

答案 1 :(得分:0)

似乎这是一个临时问题,可能在可可豆荚方面。重新尝试了“pod install&#39;今天它没有问题。