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?
Latest comments (20)
Rails is special because it's good at so many things. It's easy to get started, it's got a best-practice gem and reference architecture for just about everything, and it can scale up in project size just about as well as anything. It's also good at lots of different jobs - but as other commenters have said, most apps are being built these days with an API-server backend (rather than server-side view templates). So, some of the things that Rails does well are less relevant today than they were when it was younger. As an API server backend, there's also more competition. Writing an API server is less complex than writing a complete app using view templates, simply because the backend does fewer jobs. Of course, this complexity has just been shifted to the front-end, where the JS framework wars now rage...
Let me net this out :-) When Rails was created, Rails was the entire app. There was generally no separate front-end aside from sprinkles of JQuery. Rails did a ton of stuff that other frameworks could not compete with. The competition (JSP, 10-years-ago-PHP, CGI bin scripts) was poor. Now, the job is easier, because backends are mostly JSON API servers. And there are a lot more frameworks that are capable of doing that. So, developers have a lot more options now to get the backend "job" done and that alone might be driving a decline in "market share" for Rails. There's just more competition.
By the way, despite all the debate about what framework is the best, the choice of framework at many successful companies is driven by just one factor - which has almost nothing to do with technical superiority - it's the one that the CTO used to build the prototype. This original app often becomes the "money maker" code base. Subsequently, some microservices are sprinkled around it to flesh out the functionality and make it more powerful; but more often than not, that original repo lives on for a very long time.
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.
five nights at freddy’s
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:
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'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.
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 💪
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 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.
At least on the Ruby subreddit every time performance gets brought up, folks point to Shopify as an example of Ruby at scale. So someone is using Ruby in an environment where performance is somewhat critical, but Shopify is required to do some absolutely insane optimizations to server their userbase
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.
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.
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.
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.
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 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..
Given enough time, most predictions eventually come true.