Search code examples
rubymacosreadlinerbenv

os x ruby irb/pry not able to display €


I'm not able to paste in pry or irb.

I think there is a problem with readline so I tried reinstalling ruby and installing different versions using configure opts.

Libyaml, readline and openssl are installed via brew. Ruby is installed via rbenv.

$ brew --prefix readline
/usr/local/opt/readline

Installed ruby with:

RUBY_CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` --with-readline-dir=`brew --prefix readline` --with-libyaml-dir=`brew --prefix libyaml`" rbenv install 2.1.5

Terminal: Is working in both terminals (Terminal.app and iTerm2) but not working while I'm in irb.

Any ideas?

EDIT: £ is not working aswell. Instead of £ I get #.

raducroitoru@dotix ~/.rbenv/versions/2.1.5/lib/ruby/2.1.0/x86_64-darwin14.0$ otool -L readline.bundle
readline.bundle:
    /usr/local/opt/readline/lib/libreadline.6.dylib (compatibility version 6.0.0, current version 6.3.0)
    /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
    /usr/local/lib/libgmp.10.dylib (compatibility version 13.0.0, current version 13.0.0)
    /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

Solution

  • Try $ irb -EUTF-8. What's the output of $ locale in your terminal?

    https://github.com/cantab/unicode_titlecase/wiki/Displaying-Unicode-Text-in-irb