Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
OrganizationEventAdvent CalendarQiitadon (β)
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

rails console(irb)でASCII以外のUnicodeの文字列がコード表記になってしまう時の対処法

Rails consoleでäと打つと、\U+FFC3\U+FFA4 が表示されてしまう。当然日本語もハングルもダメ。


readline が ruby のコンパイル時に使われてないのが原因らしい。なのでreadlineを指定して再インストールする。 readlineのディレクトリは環境に合わせてかえてください。特にバージョン6.2.4は変わってる可能性が高し。

CONFIGURE_OPTS="--with-readline-dir=/usr/local/Cellar/readline/6.2.4/" rbenv install 2.0.0-p247
rbenv: /Users/ironsand/.rbenv/versions/2.0.0-p247 already exists
continue with installation? (y/N) y


How to input Unicode character in Rails console? - Stack Overflow

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Help us understand the problem. What are the problem?