Fix for installing old gems on modern linuxes (Ubuntu 26.04)

Posted . Visible to the public.

On Ubuntu 26.04, installing gems with native extensions regularly fails with various compiler warnings. This is usually due to your updated C or C++ compiler enforcing different standards.

While it is possible to work around most cases with various flags, the simplest solution seems to be:

  • Install the older C and C++ compilers using
    apt install gcc-13 g++-13
    
  • Install gems with
    MAKEFLAGS="CC=gcc-13 CXX=g++-13" bundle install
    
Profile picture of Tobias Kraze
Tobias Kraze
Last edit
Tobias Kraze
License
Source code in this card is licensed under the MIT License.
Posted by Tobias Kraze to makandra dev (2026-10-26 14:35)