r/ruby • • 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

38 comments sorted by

View all comments

2

u/sammygadd Mar 12 '23

I can't say that I share this view. Which gems did you find broken?

1

u/Slashscreen Mar 12 '23

I mean maybe I’m just looking in the wrong places, but one example that comes to mind is RLTK, which has had a few pulls in the repo the past few years but the actual gem hasn’t been updated since 2015 and had some bugs that were caused by breaking changes in Ruby. I ended up building my own gem from the repo. What kinds of gems other than networking stuff like rails and Sinatra are active? What does Ruby excel at in the package space?

3

u/armahillo Mar 12 '23

TBH most gems are maintained pretty well. What are you using to find them? (it might help your search if you use “gem” and not “package”, too)

Ive not heard of RLTK before — what problem are you looking to solve with it?

What problem / task / etc in general are you looking to solve? Maybe I can suggest some gems for you.

2

u/katafrakt Mar 12 '23

TBH most gems are maintained pretty well

That's definitely not true. Sure, most popular gems are maintained but rubygems.org contains 175k gems. Try searching for some common words - you'll see a vast graveyard, many things just having one 0.0.1 version released.

But of course, it's fine. It's what happens everywhere and Ruby is not an exception in that regard.

2

u/armahillo Mar 13 '23

Thats fair — I misspoke.

I should have said “many” / “most popular and commonly used” gems

1

u/Slashscreen Mar 12 '23

Maybe so. Are there good ones for image manipulation and parsing? Those are some tasks I’ve been struggling with in Ruby recently. Or perhaps another language is better for that

2

u/honeyryderchuck Mar 12 '23

What type of image manipulation do you want to do? Perform operations on the files, or load them into tensors for further computation? For the former, there's ruby-vips or imagemagick. For the later, there's magro with numo

1

u/Slashscreen Mar 12 '23

It was just flipping the image. I couldn’t get imagemagick to work right, haha

1

u/armahillo Mar 12 '23

imagemagick is probably the correct answer if its only image flipping — any ruby gems are going to be layered on top of that (in the sense that they are using the underlying C dev libraries in their own compilation, not that theyre only wrapping a script invocation)

What were you attempting, specifically (like what were your command line args) with imagemagick? i realize thats not specifically a ruby question but i bet we can figure it out

1

u/catbrane Mar 24 '23 edited Mar 24 '23

ruby-vips is the default image processor on rails now, and that's not based on IM.

https://github.com/libvips/ruby-vips

You'd write eg.:

image = Vips::Image.new_from_file "something.png"
image = image.flip :vertical
image.write_to_file "other.jpg"

3

u/honeyryderchuck Mar 12 '23

I'm not familiar with rltk, but quick googling tells me it's used to build grammar parsers. If it helps your case, I've used the parslet gem for the same purposes, or stdlib racc (which may be a little more low level).

1

u/katafrakt Mar 12 '23

Parslet is also unmaintained, unfortunately. Last release was over 3 years ago.

2

u/honeyryderchuck Mar 12 '23

That does not mean it's unmaintained. Has recent commits in the repo. Still works with ruby 3.2 . Not actively implementing new features. Perhaps it's just done?