Why you shouldn't using linux packaging to install Ruby

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Old Geek
Level 1
Level 1
Posts: 20
Joined: Wed Sep 30, 2020 5:55 pm
Location: Canada

Why you shouldn't using linux packaging to install Ruby

Post by Old Geek »

I just was force to make a total re-installation because a problem with Apt installation.

From my experience, Using apt install it always lead to a total corruption of the Ruby install. Ruby have is own packaging system. Apt will manage nicely if you only use Debians packages. But Ruby have more than a thousand gems and most of them have no Debian package. So a some point you gone be screwed because of that.

So the safest ways is:

- To install rbenv and install your version(s) of Ruby with it.
- And using Rubygem to install your Gems
- Never use Apt for anything related to Ruby or Rails

Debian are trying to drive a car with 2 drivers at the same time. That`s a recipe for disaster. OpenSuse did try this for a long time, and it always failed.
Last edited by LockBot on Thu May 25, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux Mint 21
Cinnamon
I7 intel
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Why you should'nt using linux packaging to install Ruby

Post by Termy »

To be fair, it's a difficult situation to properly address. APT allows us to have easy access to Ruby, both for development and as a user. I would guess it's a similar situation with PERL's CPAN, but I don't tend to mess around with CPAN. I'm not quite convinced it was just straight up APT's fault or the Ruby packages. That being said, I'm glad I'm not a Ruby programmer, so I don't have to deal with this. :P
I'm also Terminalforlife on GitHub.
User avatar
karlchen
Level 23
Level 23
Posts: 18229
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Why you should'nt using linux packaging to install Ruby

Post by karlchen »

Old Geek wrote: Fri Nov 25, 2022 10:17 am I just was force to make a total re-installation because a problem with Apt installation.
Which is just a statement supported by no pieces of evidence.
Old Geek wrote: Fri Nov 25, 2022 10:17 am From my experience, Using apt install it always lead to a total corruption of the Ruby install.
Which is just a statement supported by no pieces of evidence.

My experience tells me that usually it is the other way round: users assuming they were wiser than the developers of the APT software management system screw up their Linux systems (partially or completely) and blame the APT software management system for it.
Just my experience and my statement, not supported by any pieces of evidence. - I leave it to any interested reader to retrieve threads, which support my point of view.
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
Old Geek
Level 1
Level 1
Posts: 20
Joined: Wed Sep 30, 2020 5:55 pm
Location: Canada

Re: Why you should'nt using linux packaging to install Ruby

Post by Old Geek »

My evidence: more than 20 years of programming on Linux ...
Linux Mint 21
Cinnamon
I7 intel
User avatar
karlchen
Level 23
Level 23
Posts: 18229
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Why you should'nt using linux packaging to install Ruby

Post by karlchen »

Old Geek wrote: Fri Nov 25, 2022 2:37 pmMy evidence: more than 20 years of programming on Linux ...
How do your 20 years explain, what precisely might be wrong with installing Ruby on Linux Mint using the APT software management system?
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
Old Geek
Level 1
Level 1
Posts: 20
Joined: Wed Sep 30, 2020 5:55 pm
Location: Canada

Re: Why you shouldn't using linux packaging to install Ruby

Post by Old Geek »

What about using common sense?
Who are more likely to make the best installer. Ruby-lang.org or Debian?

https://guides.rubygems.org/rubygems-basics/
Do you see any mention of Linux packaging the installation of the Gems?

https://www.ruby-lang.org/en/documentat ... tallation/
I didn't any suggestion of using both packaging system

And the risk of conflict has been confirm
https://stackoverflow.com/questions/444 ... alled-ruby
Linux Mint 21
Cinnamon
I7 intel
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Why you shouldn't using linux packaging to install Ruby

Post by Termy »

As I say, it's a difficult task to get right. We obviously need a package manager in Linux, so we have one, a vital and successful part of which is APT. Then we have a high level programming language like Ruby, with libraries which are separately downloadable, something which APT is and will likely never be written to track — it's for Debian packages, after all. Same with PERL's CPAN, same with Snaps, AppImages, Flatpaks, separately-compiled software, PIP, etc.

While I don't have much experience with Ruby, I can appreciate where there might be a conflict between what is downloaded outside of APT and the Debian packages downloaded by APT. There's a lot more than just "APT broke Ruby" going on here, I think. If installing Ruby with APT works on a fresh installation, then nothing is broken. If you install conflicting libraries (Gems?) with a separate package manager, then I believe the onus is on you to ensure you address or avoid those conflicts.

While I respect the dedication and experience, saying you have 20 years experience with programming doesn't really mean too much in this instance. You might be an experienced programmer, but that doesn't mean you understand how Debian/Ubuntu packing, APT, Linux, Ubuntu, or Linux Mint works. A little humility can go a long way. OP, had you been more forthright with information and not just effectively given us "I know X because I know Y", this thread might've been more productive. This reminds me of when I came from Windows to Linux, thinking I was a 'power user', then getting annoyed with Linux when I repeatedly found my Windows knowledge meant almost diddly-squat in Linux.

It's important to complain about the right thing, if you're going to at all. In this case, complaining at APT breaking Ruby is similar to complaining at the ground for being wet, when it's the rain that caused it. APT deals with Debian packages, as mentioned above, so it's quite possible there's an issue with how various Ruby packages are packaged; I don't think it's likely, but it's certainly not impossible. I've definitely seen some questionable Debian packages over the years. APT, however, does as it's told by packages. Well, technically, APT deals with a lot of stuff, but it itself doesn't install software, that's dealt with by tools like dpkg(1) — the under-the-hood of Debian packaging, basically.
I'm also Terminalforlife on GitHub.
Old Geek
Level 1
Level 1
Posts: 20
Joined: Wed Sep 30, 2020 5:55 pm
Location: Canada

Re: Why you shouldn't using linux packaging to install Ruby

Post by Old Geek »

I do not thing their is a problem with the Debian package if you are only using that.

But my previous experience have always been the same: When you are mixing both of them, the problem are starting to appeared. OpenSuse is using Ruby for Yast. And you can't remove the one provide by the system without crashing the distro. And rbenv is having a hard time doing a proper job. I change for Mint for this reason.

And with the conventional approach with package, editors have erratic behaviors. Sometime they are finding the gems for beautifying and colorizing the code. Sometime they don't. Clearly there are problems. My guess:The order of installation make the difference.

Linux is my main tool. I depend on that to make my living. And when Linux misbehave, it is a big problem for me. I not preaching to convince anyone. I am looking for a way to eliminate those erratic behaviors. And so far, it is the least problematic.
Linux Mint 21
Cinnamon
I7 intel
Locked

Return to “Software & Applications”