8

Update: I found almost exact similar question, yet it has slightly different prerequisites and thus doesn't help much.

Given:

  • MacOS Lion 10.7.3
  • rvm 1.14.2
  • ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]

    Ruby was installed with the following line:

    rvm install 1.9.3 --with-readline-dir=/usr/local/Cellar/readline/6.2.2/

When I fire up irb or rails c and start typing unicode characters, I get:

\U+FFD0\U+FFBF\U+FFD1\U+FFD0\U+FFB8\U+FFD0\U+FFBC\U+FFD0\U+FFB5\U+FFD1

How do I get unicode characters displayed correctly when typing on Ruby/Rails consoles?

P.S. Typing same characters in bash session of Terminal result in proper output.

P.P.S. Just to be clear -- in console I am typing russian characters: are they considered unicode symbols?

4

3 回答 3

21

RVM 存在通过自制软件安装的 readline问题。这个要点对我来说非常有用:

$ rvm get latest
$ rvm pkg install readline
$ rvm install 1.9.3 --with-readline-dir=$rvm_path/usr

而不是install你可以使用reinstall.

于 2012-06-20T09:23:14.843 回答
3

rvm reinstall all --force帮了我

于 2012-10-23T11:59:51.643 回答
0

其他解决方案是使用http://railsinstaller.org它已经提供了为 Ruby 和 Rails 编译的所有内容,我正在努力解决所有库编译问题并提供一个包。

于 2012-06-20T14:55:27.560 回答