Readline似乎被打破了

时间:2014-01-23 21:31:40

标签: ruby rspec guard listen

我正在使用rspec和pry。

我一直收到这个错误:

Error: can't modify string; temporarily locked
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:626:in `readline'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:626:in `block in readline'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:566:in `handle_read_errors'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:611:in `readline'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:384:in `retrieve_line'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:301:in `block in r'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:298:in `loop'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:298:in `r'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:276:in `re'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:254:in `rep'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:234:in `block (3 levels) in repl'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:232:in `loop'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:232:in `block (2 levels) in repl'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:231:in `catch'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:231:in `block in repl'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:230:in `catch'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_instance.rb:230:in `repl'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-0.9.12.4/lib/pry/pry_class.rb:170:in `start'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/pry-byebug-1.2.1/lib/pry-byebug/pry_ext.rb:19:in `start_with_pry_byebug'
/home/eric/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/guard-2.3.0/lib/guard/interactor.rb:133:in `block in start'

我看到这是一个很受欢迎的话题,但我还没有找到一个好的解决方案。我正在运行ruby 2.1.0以及最新版本的guard&在Centos 6.3上听(2.4.0)。我尝试将rb-readline添加到我的Gemfile中,但这破坏了pry的历史功能。

1 个答案:

答案 0 :(得分:0)

当前版本已损坏 - 请返回2.2.5。

在我开始忽略像这样的vim点文件之前,它也给了我同样的错误:

watch(%r{^app/workers/[^.](.+)_worker\.rb$})          { |m| "spec/features/workers/#{m[1]}_spec.rb" }

编辑:有时对我来说仍然失败,我没有解决方案 - 尽管如此标记这一点。