LoginSignup
1
1

More than 5 years have passed since last update.

jenkinsでpod install時にEncoding::CompatibilityErrorが出た場合

Last updated at Posted at 2016-03-14

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

これで解決できました。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1