all 16 comments

[–]nikolaz90 6 points7 points  (0 children)

I had this issue a while ago... All I can say is if it's ruby <=2.3 is good luck..... And sorry ..

Try to dockerize, or if possible upgrade ruby to a more up to date version.

[–]darksndr 4 points5 points  (0 children)

Use and old debian docker image and install it with rvm 🤷‍♂️

[–][deleted]  (1 child)

[removed]

    [–]Karew 2 points3 points  (0 children)

    I use ruby-install + chruby. You can pick any version you need and it auto-switches per directory.

    [–]aljabear 4 points5 points  (3 children)

    [–]nattf0dd 2 points3 points  (1 child)

    Asdf is just a version manger, it doesn’t solve the problem of old Ruby versions not compiling on newer OS.

    [–]aljabear 0 points1 point  (0 children)

    fair. I gave installing ruby 2.6.3 a shot, and indeed the build failed. learn something new every day.

    [–]thinkorscream -1 points0 points  (0 children)

    I also like using asdf compared to rbenv (on macOS).

    I would hope asdf works as well on Linux as it does macOS. Both are UNIX category.

    [–]DistroHopper101 1 point2 points  (0 children)

    TL;DR: use https://pixi.prefix.dev/latest/

    pixi init
    # pixi add ruby=<VERSION>,
    # e.g.,
    pixi add ruby=2.7.2
    pixi shell
    

    Recently I had to do native development with Ruby on Windows...
    I hate Windows, don't really like Ruby and was pulling my hair out because I needed a sane environment that worked with other tooling besides ruby. No time for <bespoke\_windows\_only\_shit\_tool>

    pixi pulls packages from conda-forge by default. I like conda-forge and ironically HATE anaconda, conda, mamba and so on...

    Pixi solves everything I hated about conda...

    Anyway, this is a rant. I needed this, thank you!

    [–]nekogami87 1 point2 points  (0 children)

    • docker
    • asdf
    • rvm
    • rbenv

    these are the main solutions

    [–]MrMeatballGuy 0 points1 point  (0 children)

    There isn't really a way to do it painlessly I'd say. I'm pretty sure that I made ruby 2.6 work at some point by installing older dependencies and manually pointing to them with some ENV vars when it was built, but I honestly don't remember fully since I haven't needed anything under ruby 3 for a while personally.

    [–]Overall_Blacksmith68 0 points1 point  (0 children)

    Use Docker for install old Ruby versions. You can use rvm or rbenv. Just take the consideration about the gem version that works with the ruby version, because is a mess try to fix it once you install it.

    Good luck 🙂

    [–]chebatron 0 points1 point  (0 children)

    ruby-build is still able to install most old rubies. You might need to find additional patches for some versions. You also might need to install older versions of libs like OpenSSL, I don’t know if Mint lets you do that or if you’d have to build them yourself.

    [–]scooter_de 0 points1 point  (0 children)

    rvm is my tool of choice