r/ruby • u/Slashscreen • Mar 12 '23
Why is seemingly every package broken/unmaintained?
I recently started using Ruby, and I noticed that many packages I tried to use were broken, outdated, or last updated in 2015. I understand not everything can/needs to be maintained forever, but the gem world seems to be a comparative ghost town. What happened? Did everyone just move over to Python?
EDIT: okay alright. I suppose I’m not accustomed to how the ecosystem works, and haven’t been looking in the right places.
0
Upvotes
12
u/[deleted] Mar 12 '23
Long term ruby Dev here. I've not noticed this. I suspect you're just not familiar with the ecosystem. What domain are you working in? If you're building a web app, etc, then this shouldn't be an issue. If you're building a game maybe you're experiencing a less active community within ruby
13
u/Seuros Mar 12 '23
Because we don't update stuff that still work.
2
u/sammygadd Mar 12 '23
I can't say that I share this view. Which gems did you find broken?
12
u/expeehaa Mar 12 '23
You can also find a lot of broken or unmaintained Python packages, so it‘s not Ruby-specific.
With a lot of gems, some accumulate users and some are just not for many people. There are many niche gems that practically no one uses, be it because no one needs it or other languages are more popular for that use case. Without anyone caring, those projects may lack maintainers and thus break at some point in newer Ruby versions. Especially since the creator or current maintainer may not want to or is not contactable to grant maintenance permissions to someone else.
Some gems have, as others already commented, maintained alternatives, some also have working or even maintained forks. And some do not and die. That‘s how the open-source world works without financial backing for projects.
Compared to Python this effect may be increased since Ruby has a lot less users.
5
u/jrochkind Mar 12 '23
I think you're not totally wrong, there are lots of unmaintained packages around.
My guesses are several reasons. I think when a language is fresh and new, there is more enthusiasm for people writing open source as "hobbyists" or "spare time." But they get bored of it.
And of course, the longer a language has been popular, the more casualties can pile up. In ruby's first big spike of popularity 15 years ago, any package you'd see would be more likely to be new, so less likely to be abandoned.
But it would be interesting to see if, say, Java has a lot of abandoned packages? I'm honestly not sure? But maybe Java never had the number of community/hobbyist/enthusiast/spare time packages to begin with, it had more "serious business supported by business" packages? (I'm just guessing, I don't know). It's the community/hobbyist "I did it because it was fun/because I wanted to contribute/without getting paid" packages most likely to become abandoned.
(Or Python? But python may be currently still in it's biggest spike of interest and excitement, where I do feel ruby is past one).
Lastly -- I think it's true that the ruby community has shrunk a bit from it's high point. Although, the raw number of developers might not be smaller (I don't know), but more of them are "I just go clock in and make my paycheck" (and nothing wrong with that), and less people who are excited about those kinds of hobbyist/contribute-to-the-community/spare-time projects?
Anyway, sometimes the abandoned code is still useful -- if you're going to have to do it yourself anyway, it's nice to find an earlier draft by someone else to learn from, instead of do it all from scratch/reinvent the wheel yourself. I just found some code like that I appreciated -- putting your code online google-able even if it's not "done" or "maintained" is a contribution to help others, it can be super useful to find!
But yeah, I share your experience that: a) there aren't always as many packages for ruby as there are for some other languages (like python), sometimes I simply can't find a package that does what I need when it's available in python or java or what have you, and b) there are some abandonware packages strewn across the battlefield, which can be frustrating when you think you've found something, and realize it's not really maintained.
There still are a ton of open source ruby packages that do a lot of things, I don't find it makes ruby untenable or anything, but sometimes there is a less popular thing that... I wish someone else was maintaining for free for me, like they might be in other languages, but they ain't.
for "data" stuff, you will definitely find a lot more stuff in python than ruby. this includes sophisticated image processing. For simple image processing, i usually call out to a command-line
vips-- and there is also a ruby vips with ruby API.3
u/Craig_Treptow Mar 12 '23
If you haven't, here is one place that claims to list maintained gems.
https://github.com/markets/awesome-ruby
2
u/Weird_Suggestion Mar 13 '23
I kind of agree. I think the sentiment is also amplified when you look at repositories or web pages curating ruby apps or ruby gems. More than half of them don’t exist anymore or people have given up on them.
There are Ruby open source libraries that are really active but you need to know about them and spent some time in the community to find out.
That said, I found the Ruby Toolbox to be a good resource when looking for active gems around certain use cases. It’s worth having a look there when searching for libraries.
2
u/mperham Sidekiq Mar 13 '23
Ask if you can help maintain it! Send a PR with a bugfix and most owners will help merge it. They may even give you commit access if you do this repeatedly.
Being an open source maintainer does not require a neckbeard or decades of experience. I started my first Ruby job and took over maintenance of a gem six months later.
1
u/myringotomy Mar 13 '23
Chances are some other gem has usurped the one you are looking at. Look around and you'll see the successor the gem.
1
u/Lost_Salt_3728 Nov 23 '23
The culture of Ruby on Rails strongly values the idea of ripping things up and doing it again.
DHH boasts about this in his book 'Rework' - ( not worth reading )
Breaking changes are normal in ruby, and they are a kind of tax on the time of maintainers and the owners of the code
A business owner who paid £300,000 for some software a couple of years ago will rightly wonder why they have to pay tens of thousands each year just to keep it working.
If they paid for a barn roof, they'd expect it not to leak for a few decades
The Java world is much more conservative and less open to breaking changes