pod install
処理のAnalyzing dependenciesで以下のエラーが出た場合です。
incompatible character encodings: UTF-8 and US-ASCII (Encoding::CompatibilityError)
よくあるのが、Podfileで「`」 と書いてあると出るエラーです。この場合は 「‘」 に書き直すと大丈夫です。
しかし、ターミナルで pod installすると動作するのにjenkinsだけ動作しない場合がありました。
よく見ると直前に以下のエラーが出てました。
[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
まずは、現在の値が何になっているかをjenkinsの「シェルの実行」で 以下を記述してみたところ en_US.UTF-8
でした。
echo $LANG
直接ターミルで確認した時は、ja_JP.UTF-8
でした。
$ echo $LANG
ja_JP.UTF-8
解決方法
~/.profileを作成して、以下のように記述します。
~/.profile
export LANG=ja_JP.UTF-8
以下も忘れずに追加しておきます。
~/.bash_profile
if [ -f ~/.profile ] ; then
source ~/.profile
fi
これで解決できました。