【问题标题】:Ruby Readline crashes console on up arrowRuby Readline 在向上箭头上崩溃控制台
【发布时间】:2013-07-08 19:57:02
【问题描述】:

当我在 Rails 控制台中按向上或向左箭头时,我得到了这个错误:

irb(main):001:0> /Users/me/.rvm/gems/ruby-2.0.0-p247/gems/rb-readline-0.4.2/lib/rbreadline.rb:4269:in `block in _rl_dispatch_subseq': invalid byte sequence in UTF-8 (ArgumentError)

我使用rvm 来管理我的 ruby​​ 安装。我正在使用

=> ruby-2.0.0-p247 [ x86_64 ]

我使用 bundle 来管理我的 gem,我有 rb-readline (0.4.2)(人们推荐它是最少错误的版本)。

我需要做些什么才能一劳永逸地消除这个可怕的错误?

我在Mac OS X 10.8.3。我的rvm requirements 已经是最新的了:

$ rvm requirements
Installing requirements for osx, might require sudo password.
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.

【问题讨论】:

  • 你有LANG设置吗?
  • 对不起,我不知道那是什么
  • 在你的shell中运行echo $LANG

标签: ruby rvm readline rails-console


【解决方案1】:

卸载 rb-readline gem - RVM 应该获得 readline 头文件来编译 ruby ,这反过来应该使 ruby​​ readline 编译并且一切都应该工作

【讨论】:

  • 您可以尝试更新 gem 版本:bundle update rb-readline。对我来说,版本从 0.5.4 升级到 0.5.5 有效。
猜你喜欢
  • 2015-07-04
  • 2011-07-04
  • 2020-12-27
  • 1970-01-01
  • 2014-04-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-06-03
相关资源
最近更新 更多