I think it's quite sad that Ruby is so associated with Rails. Ruby is one of my favorite languages and last time that I touched a Rails code was in 2017. Even in web dev Rails is not the only thing in Ruby, there's also Sinatra which is an elegant micro-framework for building HTTP APIs, similar to Flask.
Some projects that I remember that uses Ruby that are not related to web dev: Homebrew, Metasploit, Vagrant and Jekyll.
I also find Ruby very useful for shell scripts. I wrote a blog post about that some months ago, you can read it and the discussion about it here: https://news.ycombinator.com/item?id=40763640
I got into Ruby kind of early, around 2001. When Rails initially came out a few years later (circa 2004, IIRC) I remember being excited to see something putting Ruby out there giving it some publicity. But in a few years I think a lot of us were regretting the fact that most people's view of Ruby was formed by Rails.
Ruby is my go to language for short "fun" programs, as there are many places where it optimized for development experience (such as the new "it" feature). One of the committers, Yusuke Endoh, clearly understood the joy of coding in itself as opposed to being means to an end, and has authored a book on esoteric programming:
Oh yes, Ruby is my go to language to use when I need to glue things together or when I want to automate tasks on my computer. It's such a pleasant language to use!
I think the reason it's not talked about a lot is mainly because Rails overshadowing it and because there aren't so much hype or controversies around it.
At my day job we use Ruby with Sorbet to stitch together a large number of data engineering pipelines. It's a good choice since we also often stand up small Rails apps to expose the results from those pipelines, so we can keep everything in one language. The fluent functional approach it enables is pretty nice for that business logic (but I would not want to do it without the gradual typing on top). We do find ourselves glancing over at the Python ecosystem with envy from time to time but overall it has worked pretty well. As I've gotten better with it I find myself reaching for irb for more and more one-off tasks in the shell too.
Oh nice! I haven't used Sorbet yet, but this is the second time I've heard good things about it outside of Stripe (where it originated). I'll have to give it a proper look.
Yup, I wrote smartcard reader programs in it. Some of them talk to a http server using async-http. It can be used for anything that Perl or Python is good at, well maybe except data science because Python really shines there. And irb is massively useful for everyday tasks.
Is that really something that's been slated to be added to the language proper? I attended RubyConf and in his keynote Matz seemed pretty opposed to adding types to Ruby source, and argued in favor of automatic typing instead.
Crystal is the closest alternative to Ruby with types we have, even though they are semantically different and differ in some places. I do not see why you mentioned Dart as an alternative thought, it’s a totally different language.
Yeah I actually did not necessarily mean to dispute Matz's perspective there. I actually think it will benefit programming as a whole if at least one widely used language takes the path of trying to eschew explicit type annotations.
Vagrant, chef, puppet and lots of other stuff is written in Ruby. It's also great as a scripting language replacing Bash, Python or Perl for any number of things. I write all my small, one off programs in Ruby.
I use Ruby extensively in ops scripting and text mangling, where it supplanted Perl for me around about the same time that Perl stagnated ca.2010-2015.
However, Ruby doesn't make sense to me as a general applications language (Swift & Kotlin have won me over from C++ & Java), or as a systems programming language (I'm still rusted on to C, pun intended), and I remain super ambivalent about Rails despite using it extensively to stick web interfaces onto things. That doubt is in large part because Rails frequently undermines the Smalltalk-ish heart of Ruby.
Yeah, I use it for everything between 5-lines-of-bash and a needs-a-compiled-language. You almost never hear about it, because it's mature. No big controversies, no huge fuckups or new versions that break everything, just a steady trickle of improvements.
Some projects that I remember that uses Ruby that are not related to web dev: Homebrew, Metasploit, Vagrant and Jekyll.
I also find Ruby very useful for shell scripts. I wrote a blog post about that some months ago, you can read it and the discussion about it here: https://news.ycombinator.com/item?id=40763640