LoginSignup
2
2

More than 5 years have passed since last update.

El Capitan で gem install mysql2 が文字化けでエラー

Last updated at Posted at 2016-03-06

現象

> gem install mysql

Building native extensions.  This could take a while...
Successfully installed mysql2-0.4.3
Parsing documentation for mysql2-0.4.3
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15/2.0.0/mysql2-0.4.3/mysql2/mysql2.bundle, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/mysql2/mysql2.bundle, skipping
Installing ri documentation for mysql2-0.4.3
1 gem installed
``=

## 対処
oh-my-zshでの文字化けが原因だった。.zshrcの冒頭に以下を追加で解決。現在の環境変数はenvコマンドで確認。

```.zshrc
export LANG=ja_JP.UTF-8
export LC_CTYPE=UTF-8

参考

2
2
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
2
2