2016-03-31 112 views
1

我得到的和错误,当我运行荚安装:错误时运行“吊舱安装”

2016-03-31 14:33:34.073 ruby[45438:513490] CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 5860. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug. 
/Users/gabrielafonso/.rvm/gems/ruby-2.2.2/gems/cocoapods-0.39.0/lib/cocoapods/user_interface/error_report.rb:13:in `report': incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError) 
    from /Users/gabrielafonso/.rvm/gems/ruby-2.2.2/gems/cocoapods-0.39.0/lib/cocoapods/command.rb:61:in `report_error' 
    from /Users/gabrielafonso/.rvm/gems/ruby-2.2.2/gems/claide-0.9.1/lib/claide/command.rb:374:in `handle_exception' 
    from /Users/gabrielafonso/.rvm/gems/ruby-2.2.2/gems/claide-0.9.1/lib/claide/command.rb:315:in `rescue in run' 
    from /Users/gabrielafonso/.rvm/gems/ruby-2.2.2/gems/claide-0.9.1/lib/claide/command.rb:303:in `run' 
    from /Users/gabrielafonso/.rvm/gems/ruby-2.2.2/gems/cocoapods-0.39.0/lib/cocoapods/command.rb:47:in `run' 
    from /Users/gabrielafonso/.rvm/gems/ruby-2.2.2/gems/cocoapods-0.39.0/bin/pod:44:in `<top (required)>' 
    from /Users/gabrielafonso/.rvm/gems/ruby-2.2.2/bin/pod:23:in `load' 
    from /Users/gabrielafonso/.rvm/gems/ruby-2.2.2/bin/pod:23:in `<main>' 
    from /Users/gabrielafonso/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval' 
    from /Users/gabrielafonso/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>' 

我没有在我的Podfile任何智能引号(至少我没有看到他们)。它发生在git merge之后。 任何人都知道这里会发生什么?

我使用cocoapods 0.39.0

由于@Jelly建议我加入报告文件:

# encoding: UTF-8 

require 'rbconfig' 
require 'cgi' 

module Pod 
    module UserInterface 
    module ErrorReport 
     class << self 
     def report(exception) 
      <<-EOS 

#{'――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――'.reversed} 

### Command 

``` 
#{original_command} 
``` 

### Report 

* What did you do? 

* What did you expect to happen? 

* What happened instead? 


### Stack 

``` 
    CocoaPods : #{Pod::VERSION} 
     Ruby : #{RUBY_DESCRIPTION} 
    RubyGems : #{Gem::VERSION} 
     Host : #{host_information} 
     Xcode : #{xcode_information} 
     Git : #{git_information} 
Ruby lib dir : #{RbConfig::CONFIG['libdir']} 
Repositories : #{repo_information.join("\n    ")} 
``` 

### Plugins 

``` 
#{plugins_string} 
``` 
#{markdown_podfile} 
### Error 

``` 
#{exception.class} - #{exception.message} 
#{exception.backtrace.join("\n")} 
``` 

#{'――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――'.reversed} 

#{'[!] Oh no, an error occurred.'.red} 
#{error_from_podfile(exception)} 
#{'Search for existing GitHub issues similar to yours:'.yellow} 
#{issues_url(exception)} 

#{'If none exists, create a ticket, with the template displayed above, on:'.yellow} 
https://github.com/CocoaPods/CocoaPods/issues/new 

#{'Be sure to first read the contributing guide for details on how to properly submit a ticket:'.yellow} 
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md 

Don't forget to anonymize any private data! 

EOS 
     end 

     private 

     def `(other) 
      super 
     rescue Errno::ENOENT => e 
      "Unable to find an executable (#{e})" 
     end 

     def pathless_exception_message(message) 
      message.gsub(/- \(.*\):/, '-') 
     end 

     def markdown_podfile 
      return '' unless Config.instance.podfile_path && Config.instance.podfile_path.exist? 
      <<-EOS 

### Podfile 

```ruby 
#{Config.instance.podfile_path.read.strip} 
``` 
EOS 
     end 

     def error_from_podfile(error) 
      if error.message =~ /Podfile:(\d*)/ 
      "\nIt appears to have originated from your Podfile at line #{Regexp.last_match[1]}.\n" 
      end 
     end 

     def remove_color(string) 
      string.gsub(/\e\[(\d+)m/, '') 
     end 

     def issues_url(exception) 
      message = remove_color(pathless_exception_message(exception.message)) 
      'https://github.com/CocoaPods/CocoaPods/search?q=' \ 
      "#{CGI.escape(message)}&type=Issues" 
     end 

     def host_information 
      product, version, build = `sw_vers`.strip.split("\n").map { |line| line.split(':').last.strip } 
      "#{product} #{version} (#{build})" 
     end 

     def xcode_information 
      version, build = `xcodebuild -version`.strip.split("\n").map { |line| line.split(' ').last } 
      "#{version} (#{build})" 
     end 

     def git_information 
      `git --version`.strip.split("\n").first 
     end 

     def installed_plugins 
      CLAide::Command::PluginManager.specifications. 
      reduce({}) { |hash, s| hash.tap { |h| h[s.name] = s.version.to_s } } 
     end 

     def plugins_string 
      plugins = installed_plugins 
      max_name_length = plugins.keys.map(&:length).max 
      plugins.map do |name, version| 
      "#{name.ljust(max_name_length)} : #{version}" 
      end.sort.join("\n") 
     end 

     def repo_information 
      SourcesManager.all.map do |source| 
      next unless source.type == 'file system' 
      repo = source.repo 
      Dir.chdir(repo) do 
       url = `git config --get remote.origin.url 2>&1`.strip 
       sha = `git rev-parse HEAD 2>&1`.strip 
       "#{repo.basename} - #{url} @ #{sha}" 
      end 
      end 
     end 

     def original_command 
      "#{$PROGRAM_NAME} #{ARGV.join(' ')}" 
     end 
     end 
    end 
    end 
end 
+0

搜索'report'文件并在此处发布。似乎有某种问题。 – Jelly

+0

你可以显示你的pofile吗? – touti

+0

@touti我想我不能。 – Gabox

回答

0

那么,问题是,这个文件:

MyProject.xcodeproj/project.pbxproj 

已损坏。我更新了它,现在它工作。

0

通常这个问题是由错误的引号字符Podfile引起的。确保你使用正确的引号(只删除旧的并从键盘再次写入应该做的伎俩)。另外请确保您打开并将文件另存为ASCII。如果你使用xCode这不应该是一个问题,但与其他文本编辑器,它可能是。

+0

我试过了。我没有看到任何错误的引号。我所有的报价都是这样的' – Gabox

+0

另外我试图删除所有,并重新替换它们,我看到相同的错误。 – Gabox

+0

我添加了报告文件 – Gabox