weifansdeMacBook-Pro:CocoaPodsTest weifans$ pod install
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.34.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.34.4/lib/cocoapods/command.rb:63: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.34.4/lib/cocoapods/command.rb:50:in
run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/bin/pod:33:in <top (required)>'
from /usr/bin/pod:23:in
load'
from /usr/bin/pod:23:in `'
weifansdeMacBook-Pro:CocoaPodsTest weifans$
好多方法都试过了不管用
Ruby Version:
weifansdeMacBook-Pro:CocoaPodsTest weifans$ ruby -v
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
CocoaPods Version:
weifansdeMacBook-Pro:CocoaPodsTest weifans$ pod --version
0.34.4
求大神:ˊ_>ˋ
Looking at the Podfile of the questioner, it is the old way of writing. Cocoapods has changed to the new way of writing after cocoapods 0.34:
Try using the new writing method above. Please replace the Apptarget in the quotation marks with the target that your App is compiled into. This is usually the name of the App project you created (its unit test target is after this). Be careful not to mistake the suffix Tests).
Update
A sentence of
source 'master'
was added to the previous code. After the official version of Cocoapods 0.34, the source command is used to build your own podspec library. If you don’t want to register your code as a podspec, you don’t need this command. However, the implicit source has been deprecated, so in order to be compatible with future cocoapods versions,source 'https://github.com/CocoaPods/Specs.git'
needs to be added in front. This repo is a Spec repo officially maintained by Cocoapods.