Ruby 1.9.0 curses Alt-key handling broken

Bug #393888 reported by Pistos
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu Server papercuts
Invalid
Medium
Unassigned
ruby1.9 (Ubuntu)
Confirmed
Undecided
Unassigned
Nominated for Lucid by Ralf Nieuwenhuijsen

Bug Description

Binary package hint: diakonos

With Ubuntu 9.04, running Diakonos 0.8.7, 0.8.8, 0.8.9, or 0.8.10 with the Ruby 1.9.0 package of Ubuntu, alt-key combinations always produce an extraneous Esc keystroke. Normally, Alt-A, for example, will send "Esc A". But with Ubuntu's Ruby 1.9.0, it seems to send "Esc A Esc". Naturally, Diakonos gets vastly confused, and the user experience is significantly degraded, since no Alt-key combinations work any more.

Furthermore, if you uninstall the Ubuntu Ruby 1.9 packages, then install libncurses-dev, and build Ruby 1.9.1 from source ( ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p129.tar.gz ), the problem no longer exists.

Based on this evidence, I am tentatively concluding that there is a bug in Ubuntu's build of Ruby 1.9.

Tags: curses keys ruby
Revision history for this message
Pistos (pistos) wrote :

Changed affected package from diakonos to ruby1.9, since this is not a bug in Diakonos.

tags: added: curses keys ruby
affects: diakonos (Ubuntu) → ruby1.9 (Ubuntu)
Revision history for this message
Sergey Shepelev (temoto) wrote :

I can reproduce bug with diakonos 0.8.12.

Revision history for this message
Lucas Jones (lucas-lucasjones) wrote :

I can also reproduce with 0.8.12.

Changed in ruby1.9 (Ubuntu):
status: New → Confirmed
Revision history for this message
Ralf Nieuwenhuijsen (ralf-nieuwenhuijsen) wrote :

Ruby 1.9 needs libncurses-dev as a build-dependency.
Who is maintaining the package? This should be a very easy fix.

Revision history for this message
Ralf Nieuwenhuijsen (ralf-nieuwenhuijsen) wrote :

I've nominated this for server-papercuts. Although it's not that important, it's sort of annoying that ruby scripts can't deal with curses properly when using 1.9. It means no diakonos, but worse: no io terminal based ruby scripts.

Also, outside of this bug scope, (i'm sorry to put this here) but I would like the server guys to try to get the ruby platform together. Debian has completely ____ up their ruby support.

My suggestion is quite simple. Make ruby default to 1.9.2
And create a ruby-passenger-apache metapackage. One that actually works.
This would install passenger, ruby, gem and configure apache.

Just because we can do apt-get install rails, doesn't mean it's wise and EVERYBODY is advising against it.

For your information to current workaround EVERBODY uses for ruby now is:
 - install build-essentials, apache dev-headers
 - download ruby
 - compile and install ruby yourself (which by default includes gem now)
 - gem install passenger
 - passenger-install-apache module

What it should be like:
- apt-get install ruby1.9.2 gem1.9.2
- apt-get install apache-module-passenger
- gem install rails

Rails shouldn't be packaged. Sites we make or share don't work with rails.
They work with a specific version of rails. Gem can install any version side-by-side.

Oh now, we are at it, diakonos has a new upstream version as well that fixes a few annoying bugs.
Diakonos should be a great contenter for default text-editor on the ubuntu server platform.
(it has all the nice vim features, but defaults to keybindings of gedit/kedit .. )
Diakonos requires 1.9.2 .. btw .. i don't know why current package depends on ruby1.8 (it's a mistake)

Please, for the LTS release, make ruby support less of nightmare.
We would be even better off with not having any ruby related package in the repositories, if you can't fix the current ones, because that would save a lot of people a lot of time.

Revision history for this message
Lucas Nussbaum (lucas) wrote : Re: [Bug 393888] Re: Ruby 1.9.0 curses Alt-key handling broken

On 22/01/10 at 17:57 -0000, Ralf Nieuwenhuijsen wrote:
> I've nominated this for server-papercuts. Although it's not that
> important, it's sort of annoying that ruby scripts can't deal with
> curses properly when using 1.9. It means no diakonos, but worse: no io
> terminal based ruby scripts.
>
> Also, outside of this bug scope, (i'm sorry to put this here) but I
> would like the server guys to try to get the ruby platform together.
> Debian has completely ____ up their ruby support.
>
> My suggestion is quite simple. Make ruby default to 1.9.2
> And create a ruby-passenger-apache metapackage. One that actually works.
> This would install passenger, ruby, gem and configure apache.
>
> Just because we can do apt-get install rails, doesn't mean it's wise and
> EVERYBODY is advising against it.
>
> For your information to current workaround EVERBODY uses for ruby now is:
> - install build-essentials, apache dev-headers
> - download ruby
> - compile and install ruby yourself (which by default includes gem now)
> - gem install passenger
> - passenger-install-apache module
>
> What it should be like:
> - apt-get install ruby1.9.2 gem1.9.2
> - apt-get install apache-module-passenger
> - gem install rails
>
> Rails shouldn't be packaged. Sites we make or share don't work with rails.
> They work with a specific version of rails. Gem can install any version side-by-side.
>
> Oh now, we are at it, diakonos has a new upstream version as well that fixes a few annoying bugs.
> Diakonos should be a great contenter for default text-editor on the ubuntu server platform.
> (it has all the nice vim features, but defaults to keybindings of gedit/kedit .. )
> Diakonos requires 1.9.2 .. btw .. i don't know why current package depends on ruby1.8 (it's a mistake)
>
> Please, for the LTS release, make ruby support less of nightmare.
> We would be even better off with not having any ruby related package in the repositories, if you can't fix the current ones, because that would save a lot of people a lot of time.

Thank you for this great off-topic and useless contribution.
--
| Lucas Nussbaum
| <email address hidden> http://www.lucas-nussbaum.net/ |
| jabber: <email address hidden> GPG: 1024D/023B3F4F |

Revision history for this message
Kamilion (kamilion) wrote :

Not so off topic. Diakonos' site links here.
I've just finished building ruby 1.9.2 for Diakonos, everything seems to work just fine for me now.
And with Ralf's 'everybody' workaround, I finally got passenger working in a couple minutes. (I had previously tried, got frustrated, and gave up.)

Two birds with one stone.

Revision history for this message
Lucas Nussbaum (lucas) wrote :

1.9.2 hasn't been released yet. If you can pinpoint a specific commit in Ruby's SVN that fixes this issue in trunk ("1.9.2"), we might be able to backport it to 1.9.1.

Revision history for this message
Thierry Carrez (ttx) wrote :

Tentatively accepted as a papercut, supposing it is just a missing build-dep as suggested in comment 4...

Changed in server-papercuts:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Lucas Nussbaum (lucas) wrote :

@Thierry:
Build-Depends: debhelper (>= 4.1.0), cdbs, dpatch, patch, autoconf, m4, bison, binutils (>= 2.14.90.0.7), libgdbm-dev, libncurses5-dev, libreadline5-dev, tcl8.4-dev, tk8.4-dev, zlib1g-dev, libssl-dev (>= 0.9.6b)

=> it already depends on libncurses5-dev.

Revision history for this message
Lucas Nussbaum (lucas) wrote :

Can you confirm that ruby1.9.1 (the Ubuntu package) is not affected?

Revision history for this message
Ralf Nieuwenhuijsen (ralf-nieuwenhuijsen) wrote :

Sorry for the late reply.

It does happen with the 1.9 ruby package in Karmic. It doesn't happen when I build from source (apt-get source ruby1.9.1 && apt-get build-dep ruby1.9.1). But it's hard to tell because I likely have all kinds of build dependencies installed. In the next few days, I'll find some time to create another virtual machiene running the ubuntu-virtual-server image of lucid. That should clear things up as to what packages have this bug and what triggers it.

I suppose it's better that I test the lucid situation than the karmic situation anyways.

Just a general question: what will the ruby transitional package refer to?
And what will be the default dependency of ruby related packages (like diakonos or passenger) to depend upon?

I would really like to see Ubuntu make the transition away from ruby 1.8 .. nobody is running stock ruby1.8 with passenger on a production server. They are either running ruby enterprise editition or ruby 1.9, because the performance simple isn't acceptable otherwise.

It would be really great if apt-get install ruby ruby-gems apache-module-passenger .. setup a working 1.9.1 setup.
Unfortunately I'm not a C programmer and am not too familiar with their build system. But i'll do my best to pinpoint the problems and possible diversions from upstream that are responsible for the issues.

Revision history for this message
Lucas Nussbaum (lucas) wrote :

On 13/02/10 at 20:11 -0000, Ralf Nieuwenhuijsen wrote:
> Sorry for the late reply.
>
> It does happen with the 1.9 ruby package in Karmic. It doesn't happen
> when I build from source (apt-get source ruby1.9.1 && apt-get build-dep
> ruby1.9.1). But it's hard to tell because I likely have all kinds of
> build dependencies installed. In the next few days, I'll find some time
> to create another virtual machiene running the ubuntu-virtual-server
> image of lucid. That should clear things up as to what packages have
> this bug and what triggers it.

the 1.9 ruby package is karmic is likely ruby1.9.*0*. I could not
reproduce the problem with ruby1.9.*1*.

> I suppose it's better that I test the lucid situation than the karmic
> situation anyways.
>
> Just a general question: what will the ruby transitional package refer to?
> And what will be the default dependency of ruby related packages (like diakonos or passenger) to depend upon?
>
> I would really like to see Ubuntu make the transition away from ruby 1.8
> .. nobody is running stock ruby1.8 with passenger on a production
> server. They are either running ruby enterprise editition or ruby 1.9,
> because the performance simple isn't acceptable otherwise.

Ruby 1.9 is just provided as a development snapshot. There are too many
libs that don't work yet with 1.9.

> Unfortunately I'm not a C programmer and am not too familiar with
> their build system. But i'll do my best to pinpoint the problems and
> possible diversions from upstream that are responsible for the issues.

There are no diversions from upstream that cause that bug. 1.9.0 is
buggy upstream, 1.9.1 is not.
--
| Lucas Nussbaum
| <email address hidden> http://www.lucas-nussbaum.net/ |
| jabber: <email address hidden> GPG: 1024D/023B3F4F |

Revision history for this message
Thierry Carrez (ttx) wrote :

Unnominating for papercuts: problem is not fully investigated yet, and it's not about a missing build-dep.

Changed in server-papercuts:
status: Confirmed → Invalid
Revision history for this message
Ralf Nieuwenhuijsen (ralf-nieuwenhuijsen) wrote :

If it is fixed for ruby1.9.1 and it works with diakonos (the only ruby console app I know) I suggest this is actually moved to a won't fix for the 1.9.0 ..

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.