Recompile ruby on archlinux after libreadline 7 upgrade

Although it was not specifically announced on the official archlinux website, the recent update of libreadline (package readline) from version 6 to 7 could lead to several problem. One of them was the concomitance of its release with the availability of a new kernel. Upgrading both of them in the same pacman transaction produces a broken kernel image if you use LVM. Bugs reported problems with cinnamon desktop – which I don't use – and nearer me, the readline upgrade broke my different rubies, installed through rvm.

The problem was in fact the same everywhere: upgrading one of the most used library without recompiling all impacted packages, or at least warned the users is wrong. But here is not the point of this article. In the best cases, readline upgrade should have been smooth for you if you don't use exotic packages. All impacted packages from core and extra had been recompiled.

But if you are used to compile yourself some of your day to day tools, this upgrade may have bothered you. I refuse to install ruby as a system app, given the fact we can use a tool like rvm to manage several different version in userspace. The bad news is: rvm compiles the rubies you install, and as irb depends on readline, you must recompile them after each readline upgrade – the same thing might be required for python installed through virtualenv. To do so, you just have to execute the following command: rvm reinstall --disable-binary <your ruby version>. In my case for exemple: rvm reinstall --disable-binary ruby-2.1.2.