I'm currently trying to run cocoapods on Windows, but after installing it I try to run pod --version
and get the following output:
Traceback (most recent call last):
4: from C:/Ruby26-x64/bin/pod:23:in '<main>'
3: from C:/Ruby26-x64/bin/pod:23:in 'load'
2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.0/bin/pod:55:in '<top (required)>'
1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/command.rb:50:in 'run'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/command.rb:168:in 'verify_xcode_license_approved!': invalid byte sequence in UTF-8 (ArgumentError)
I can't figure out what might be causing it. Any ideas?
Answering my own question, the problem seems to be related to the terminal encoding. Windows terminal does not use UTF-8 by default, so you have to change it's encoding, you can set it to UTF-8 by running:
chcp 65001