What's the state of Ruby? Is it trending down for good or just settling in to a mature niche role?

ben profile image Ben Halpern May 23, 2017

I really enjoy coding in Ruby and still think Rails is an ideal choice for a lot of apps, but it's obvious the language and ecosystem is "trending down". It's not stopping me from picking it off the shelf as a solid mature technology, but I'm curious about the future.

Thoughts on the state of Ruby and where the future lies?

markdown cheatsheet

I think the one thing that will always keep Ruby around is how easy it is to start off with when you're first learning to code. The readability of it, its elegance, the Ruby community -- these things lower the barrier of entry when it comes to being able to pick up a language, its associated framework, and the different contexts in which it ends up being the right tool for the job. It makes it really easy to hit the ground running and start being productive, particularly if you're still fairly new to the field.

Ultimately, though, I see Ruby + Rails being used more and more as an API layer. While the JavaScript wars mean that front end frameworks are in flux all the time, Ruby feels like a far more stable choice for architecting an API that people will be able to work on and contribute to easily. I'll be interested to see how Ruby adapts and changes to high-performing (read: much faster) languages, like Rust. Personally, I'm keeping my eye on things like Helix, which makes the future of Ruby seem super bright.

Helix looks way further along than when I last heard about it. That is absolutely going to be a big boon for Ruby.

I asked this question because I have a hard time articulating why I stick with Ruby. DHH's keynote which touched on culture said a lot, but I still am not sure. A couple months ago I wrote a classic Ruby bug where I passed the wrong value to a method and it really made me yearn for some stronger typing.

In many ways Ruby fits my personality and I get what DHH often says about the community and culture, but I often feel at odds with it, like intellectually.

Thanks for a really well-articulated view.

I agree - I think Ruby's future lies more as an API layer, .

Haven't tried Helix yet, but it looks most interesting.

For me, at the end of the day it comes down to a simple fact - I like Ruby.

So if it's my choice, and it seems a good fit, I use Ruby.

I hesitate to participate in these discussions because Ruby and Rails is still fun for me and works for the contexts I've used them for professionally and for fun.

What is the future of it? Eh? What's the future of anything? The truth is, depending on when you started your app, you might have decided on a Rails stack and your business priorities may not allow you to rewrite the damn thing no matter how crazy the architecture it is that you have. What about performance and all-around craftsmanship? Aren't there better ways? Yea, probably. Does every app there need to be concerned with this? In a perfect world yes. For me, if I sit and are worrying about this all the time, I'm not going to build anything. I like to treat my programming like I treat my love life: I do not do well when I'm constantly questioning "Is this really the one for me?". Does that mean I won't ever try anything different? No! In fact it allows me to try something new with the intent of just figuring it out and enjoying it without the pressure of "should this be my new thing" (in fact, I love Node and slay in JS and that doesn't make me love Rails any less). And then if the timing is right for whatever app, I'll use the shit out of it.

I do love hearing these discussions, even though I don't like to have a strong opinion on it.

I love Node and slay in JS and that doesn't make me love Rails any less

🎉🦄😎🙌👻

I think there's a lot of interesting stuff going on in ruby land. For those who need performance, there's Ruby 3x3 and TruffleRuby. For those who prefer functional programming, there's dry-rb. In Europe, alternatives to the rails way, like Hanami and Trailblazer, are gaining attention. And ruby is still rising in Japan, especially mruby.

And then there are languages like Elixir and Crystal. In my opinion, these languages prove that the philosophy behind ruby, e.g. beautiful syntax and developer happiness, is going to spread and influence the world of programming. And since these languages share the same philosophy, I wouldn't consider them competitors to ruby.

I believe that ruby, and the way we write ruby, will (have to) change. Less monkey patching, DSLs, autoloading and tight coupling. More functional programming, SOLID code and immutability.

I can't imagine ruby going down for good or becoming a niche language. I really hope it's got a great future ahead.

Nowadays most interaction is happening directly in the browser.

Rails lives of "best practices" and decisions made by experts.

But they have no common patterns for frontend logic. They stuck w/ "js.erb" for quite some time, while everyone hacked their own solution w/ backbone or ember. Now they "allow" webpack, react and co. But there is no strong integration or any benefit compared to not using rails.

Unless they introduce a radical easy way to develop frontend logic they will be reduced to "api provider" and thus soon lose their competitive advantage of being a simple/strong out-of-the-box solution.

Will they just disappear? No. PHP didn't just disappear neither. It just stopped being the thing you recommend/prefer using for new projects.

Disregarding trendiness for a sec, I see Ruby's future as exactly the same as its present and past. For me, that means it involves some combination of these ideas:

  • It's a wonderful language in which to write software
  • It's my go-to for getting MVPs out the door
  • It's the method by which I configure servers (because Chef)
  • Regardless of the end product, all of my projects start with Ruby
  • Boy, there sure is a lot of legacy code out there that needs maintained

If one's income depends on Ruby, the downward trend is somewhat similar to the usage of other once popular programming languages, and it generally means good things for individuals with deep knowledge of those languages. In short, COBOL and RPG haven't gone anywhere (regardless of how much we'd like for them to disappear), and practitioners tend to make pretty decent bank in fairly secure roles.

I think there is a decline because there is a stigma around its speed. I've built an API for tracking my companies ads. I was getting caught up with speed issues jibber and I was afraid. Then, I ran some benchmarks and stress test. It prevailed! I think people drop it cause they think way too far down the road and think their one thing will blow up tomorrow. && if it does, that's a good problem to have. A lot of people forget how easy and powerful the language is.

Rails 5 allows an API version which is a slimmer version of rails but I would like if Rails could be trimmed down further. Or maybe I need to embrace Sinatra more.

I've coded in many of languages and ruby was the first language that I truly fell in love with. My love for it is the reason why I stick around.

I'm constantly perplexed by how much attention Ruby's performance gets. Nobody uses Ruby for the kinds of tasks where performance is that critical in the first place. If you're trying to do high frequency trading in Ruby, you have other problems.

I can't agree with dismissing the performance concern. For a while many infrastructure tools were written in Ruby, and now most of them have moved to Go or another compiled language. I've seen some people playing with Crystal but I don't know anyone using it for those kinds of tools yet.

The thread about the proposed code of conduct last year was such a bummer, and it had a real impact on my enthusiasm for Ruby.

Put differently, anybody that cares about performance, would probably not want to use it for that reason and therefore is not using it. Personally, I've had good experience dodging some of the performance and concurrency issues with jruby but still ended up replacing ruby with plain java in the end. Performance wasn't the key concern here but just the fact that ruby seems to require a lot of ever elusive discipline in order to keep some notion of architectural sanity. There's just something in the ruby community that causes ruby projects to self implode under the never ending monkey patching, silly hacks and type obfuscation. At some point replacing it completely with just about anything else becomes very attractive.

A recent problem with rails is that it only made sense as long as server side MVC was a thing. That notion is sort of dead now that we have client side apps doing their own MVC layers (react, angular, etc) along with such things as graphql, microservices and simple json APIs. It's just not as good as a match for development as it was 13 years ago.

Ruby's decline was predicted in 2006 in a blog post by David Megginson (a Python programmer) about "the programming language cycle". In that blog post, David outlined a theory that programming languages are invented by elite programmers trying to differentiate themselves from the 'riff-raff'. David concluded his blog post by writing:

The final and most important point here is that a programming language’s perceived coolness will always suffer from its success. Java cannot possibly still be cool when there are thousands of regular developers slaving away in the bowels of ACME Widgets using it to write enterprise applications. If, in fact, Ruby displaces Java in the enterprise (which may not happen, since Ruby has no advantage over Java to match Java’s memory-management advantage over C++), it will suffer precisely the same fate, and we can expect Bruce Tate to write a book Beyond Ruby in five years or so.

By that measure, Python’s very failure is a kind of success — as long as it never really becomes takes hold in the workplace it will always carry a small degree of distinction with it, and at least a few elite developers won’t feel pressured to move on. Like a movie or band that never becomes too popular, Python will hang onto its snob appeal.

The implication of David's blog post though is that new programming languages aren't solely (or even primarily) motivated by technical concerns, but by elite programmers' desire to retain their social standing. So even though Ruby may have "declined", it is still a great language...just like PHP...just like Java...just like C++...etc., etc..

Ruby's decline was predicted in 2006

Given enough time, most predictions eventually come true.

Interesting topic. I code in different languages but Ruby is my core stack. I have had to ask myself this question severally. And I think I just decided to use Ruby where it is most applicable. Ruby has the best demonstration of OOP and it is readable. Yes, with time I have had to learn some Javascript for the sake of browsers and frontend, but Ruby remains to be a rock in the world of OOP and backend stuff. Long live Ruby 💪

Ruby is just such an easy language to jump into programming that it is hard to see its obsolescence for a long time to come. It has a mature community and it is difficult to find a question to ask that hasn't already been answered on stack 3 years ago.

I started with Ruby. It's still the most delightful programming language I've ever worked with. But I drank the cool aide, or in this case, the Elixir. I despised (and continue to have a strong dislike for) the JS world, outside of using vanilla js for what I need to. That left me feeling a bit out, and in that, I stumbled across Elixir and fell in love. I imagine being an elixir dev today feels like being a Ruby/Rails dev in 2008. The future is bright.

Since the lead dev on Elixir, José Valim was heavily involved in the Ruby project, and the Pheonix (Elixir equivalent to Rails) creator, Chris McCoord was loved and a known figure in the Rails community, both make a Ruby/Rails dev feel right at home in the Elixir/Phoenix world.

I honestly think there will be a slow but steady migration of Rails devs to Elixir Phoenix over the next couple years, and Ruby will slowly turn into a stable, mature software that continues to run many apps until they slowly build out key parts to alternate code. I love Ruby, but for the savings in resources and sake of sanity Functional Programming offers, I'm a happy Elixir convert.

I really love the syntax of ruby, I love the language. Rails can be a little too opinionated but it's still great because it forces a structure that is great for new devs to wrap their heads around.

But ultimately the reason I'll never ever use ruby in production is performance. It's just so slow compared to other language. It's something that's a little disconcerting that in all these years the core ruby team hasn't seemed to fix the performance issues in the language.

This is of course not a problem for hobbies or to learn with. But for production where performance is super important, ruby is just too slow compared to its competition.

Node, Golang, or Swift are just way more performant, with node being easy to use, golang being very performant but slightly harder, and swift falling somewhere in between both performance and difficulty. The three of these aren't as fast to prototype in as Ruby on Rails.

It's sad, the one language/framework that's truly super fast and easy to get something built, just happens to be one of the worst at scale.

Also worth mentioning that recently the mastodon project is a large scale project that uses a hybrid approach. A Node API, Ruby for database, and server stuff. With react for client stuff. It's the first project I've seen in a while using ruby.

I think it was chosen (I'm guessing here) because of the amazing database upgrade and rollback abilities of Ruby.

Same can be said about PHP and yet WordPress powers more businesses than any other platform. I don't think worrying about trends and fads is the right lens for making technology decisions.