Help us understand the problem. What is going on with this article?

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

More than 5 years have passed since last update.

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
http://stackoverflow.com/questions/19857471/how-to-input-unicode-character-in-rails-console?noredirect=1#comment29535126_19857471

ironsand
思いついたアイデアをすぐに形にできる能力を身につけたいのでRailsを頑張って習得中。仕事ください。
http://programming.ironsand.net/
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
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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
ユーザーは見つかりませんでした