LoginSignup
1
1

More than 3 years have passed since last update.

Railsを5.0から6.0にアップデートしたらコンソールで日本語が使えなくなった問題の解決

Posted at

コンソールで日本語を入力したらエラーで強制終了されてしまう

Railsプロジェクトのバージョンを5.0→6.0に上げたら、Rails cで立ち上がるコンソールで日本語を入力すると、
"\xE2" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
というエラーが発生し、強制終了するようになった。

解決策

Gemfileのdevelopmentグループにあるgem 'rb-readline'を削除し、$ bundleを実行する。
これでエラーが発生しなくなりました。
なぜrb-readlineが問題だったのかわかる方、コメントお待ちしています、、、

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