LoginSignup
5
4

More than 5 years have passed since last update.

pryで日本語入力ができなくて詰まる

Posted at

google先生に聞く。
http://attonblog.blogspot.jp/2015/04/pry-rails-multibyte-char.html
上記を参考に設定ファイルをいじる。
~/.pryrcにある、なければ新しく作ったファイルに書き込みます。

Pry.history.instance_eval do
   @saver = ->(line) { save_to_file (line.force_encoding(STDIN.external_encoding))}
end

・・・、でもできない。
再度google先生に聞く。

railsではなくrubyの問題だという事で、
http://qiita.com/kidach1/items/d0137d96bed9ac381fd5
上記をためす。

# 適用したいrubyバージョンが既にインストール済みの場合は一度uninstall
$ rbenv uninstall 2.1.1

# readlineのinstall
$ brew install readline
$ brew link readline --force

# readlineを利用してruby再install
$ RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline)"
$ rbenv install 2.1.1

rubyを再インストールすると、
The rails command exists in these Ruby versions
と怒られたので、
http://qiita.com/akiks/items/94ffef41ae29066f6883
上記を参考に、

gem install bundler  
bundle install

よくみたら以前もお世話になってました。
これで僕は無事日本語入力できるようになりました。

5
4
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
5
4