IRB: arrow keys to move along cmd line and up/down in history not working on Windows #4141

Closed
ssteidte opened this Issue Sep 7, 2016 · 13 comments

Projects

None yet

6 participants

@ssteidte
ssteidte commented Sep 7, 2016

Environment

Provide at least:

  • JRuby from 9.1.3 on, including .4 and .5
  • Windows

Expected Behavior

  • in IRB, arrow keys move the cursor along the cmd line or get previous/next line in history

Actual Behavior

  • while working on Linux, this has ceased working on Windows
  • there is just no action when one of the arrow keys is pressed
@headius
Member
headius commented Sep 7, 2016

This must be due to the ^C fix we did in 9.1.3 for #3721.

I don't know why it would cause this, though :-(

@headius headius added this to the JRuby 9.1.6.0 milestone Sep 7, 2016
@headius
Member
headius commented Sep 7, 2016

A workaround for you: I believe if you install the 1.0 jruby-readline gem from here you'll restore the old behavior.

@mkristian Perhaps it's time we made jruby-readline a real rubygems.org gem, so it's easier for folks to up/downgrade it as we make fixes.

@headius
Member
headius commented Sep 7, 2016

Drat...installing the 1.0 gem does not seem to fix the problem. I'll look into this today.

@headius
Member
headius commented Sep 7, 2016

Ok, here's a working workaround:

  1. gem install that 1.0 jruby-readline gem
  2. delete readline.jar from /lib/ruby/stdlib
@cmichon
cmichon commented Sep 8, 2016

The jar replacement fixes the issue. I agree the jruby-readline should become a real gem as otherwise this will remain a dirty fix.

@tobymurray-nanometrics

Would this also impact pasting content? I'm seeing some extremely weird behavior there, although I haven't tried to isolate JRuby from all the other tools which might be impacting it.

@headius
Member
headius commented Sep 21, 2016

@tobymurray-nanometrics On Windows? It certainly could.

@headius
Member
headius commented Sep 21, 2016

@mkristian I tried to release a 1.1.1 gem with the regression reverted, but I'm not sure it's building the gem appropriately for rubygems.org. I can install the gem, but attempting to activate it produces the following error:

[] ~/projects/jruby-readline $ gem install jruby-readline
Successfully installed jruby-readline-1.1.1-java
1 gem installed

[] ~/projects/jruby-readline $ jruby -v -e 'gem "readline"; require "readline"'
jruby 9.1.4.0 (2.3.1) 2016-09-01 2e1327f Java HotSpot(TM) 64-Bit Server VM 25.92-b14 on 1.8.0_92-b14 +jit [darwin-x86_64]
Gem::MissingSpecError: Gem::MissingSpecError
  to_specs at /Users/headius/.rvm/rubies/jruby-9.1.4.0/lib/ruby/stdlib/rubygems/dependency.rb:308
   to_spec at /Users/headius/.rvm/rubies/jruby-9.1.4.0/lib/ruby/stdlib/rubygems/dependency.rb:320
       gem at /Users/headius/.rvm/rubies/jruby-9.1.4.0/lib/ruby/stdlib/rubygems/core_ext/kernel_gem.rb:65
    <main> at -e:1

I believe it should be possible to put out a release of the gem, and get existing JRuby versions to load it by using gem install --default jruby-readline combined with gem install jruby-readline in some order, but this indicates it's simply not loading right.

@headius
Member
headius commented Sep 21, 2016

jruby-readline 1.1.1 released to rubygems and maven. The current workaround is

  1. gem install jruby-readline
  2. delete readline.jar from /lib/ruby/stdlib
@headius headius modified the milestone: JRuby 9.2.0.0, JRuby 9.1.6.0 Nov 8, 2016
@headius
Member
headius commented Nov 8, 2016

This is still outstanding. @enebo: Should we revert the change to jruby-readline and release 9.1.6.0 with the reverted version?

@enebo
Member
enebo commented Nov 8, 2016

@headius I feel this is more annoying than what happened in #3721 so yeah reverting feels like the lesser of two evils. I also hate second-classing windows users so perhaps this is a nice gesture :)

@headius
Member
headius commented Nov 8, 2016

This is fixed with the release of jruby-readline-1.1.1, and jruby-9.1.6.0 release today will ship that.

@headius headius closed this Nov 8, 2016
@headius headius modified the milestone: JRuby 9.1.6.0, JRuby 9.2.0.0 Nov 8, 2016
@hathawad

I can confirm this is fixed on Windows w/ jruby-9.1.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment