在终端中的Podfile上使用Pod Install命令时出错 [英] Error using Pod Install command on Podfile in Terminal

查看:262
本文介绍了在终端中的Podfile上使用Pod Install命令时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Cocoapods,并使用Atom创建了一个Podfile,其中包含以下几行:

I have installed Cocoapods, and created a Podfile using Atom containing the following lines:

pod ‘Parse’, ‘~> 1.7.1′
pod ‘ParseUI’, ‘~> 1.1.3′

将此文件放到我的Xcode项目根目录中后,在Terminal中运行"pod install".显示如下:

Upon placing this file into my Xcode Project Root Directory, and running 'pod install' in Terminal. The following is shown:

[!]您的Podfile的智能引号已被清除.为了避免出现问题 将来,您不应使用TextEdit对其进行编辑.如果你不是 使用TextEdit,您应该在编辑器中关闭智能引号 选择.

[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.

/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.38.2/lib/cocoapods-core/standard_error.rb:87:in `message': incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:367:in `handle_exception'
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:315:in `rescue in run'
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:303:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command.rb:48:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/bin/pod:44:in `<top (required)>'
    from /usr/bin/pod:23:in `load'
    from /usr/bin/pod:23:in `<main>'

我不确定我做错了什么,如果有人可以给我一些建议的话,我将不胜感激.谢谢.

I'm unsure what I have done incorrectly, if anyone could give me some advice - it would be really appreciated. Thank you.

推荐答案

您不应该使用TextEdit来编辑Pod文件,因为TextEdit喜欢 用更具图形吸引力的报价替换标准报价. 这可能会导致CocoaPods感到困惑并显示错误,因此 最好只使用Xcode或其他编程文本编辑器.

You shouldn’t use TextEdit to edit the pod file because TextEdit likes to replace standard quotes with more graphically appealing quotes. This can cause CocoaPods to get confused and display errors, so it’s best to just use Xcode or another programming text editor.

文本

使用TextEdit将为您提供以下服务,

Using TextEdit will give you following,

pod ‘Parse’, ‘~> 1.7.1′    //notice the quotes

要在TextEdit中关闭智能引号,请转到

To turn off smart quotes in TextEdit, goto

TextEdit > Preferences > New Document > Options

Xcode:

要获得正确的报价,应该在打开Podfie时使用Xcode:

To get the correct quotes you should use Xcode when opening Podfie:

pod 'Parse', '~> 1.7.1'

使用Xcode应用程序打开的终端命令:

Terminal Commands to open using Xcode app:

$ touch Podfile  //OR $ cd <parentDirectory of Podfile>
$ open -a Xcode Podfile

这篇关于在终端中的Podfile上使用Pod Install命令时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆