Ruby is dead, long-live Ruby

A couple of “Ruby is dying, I wouldn’t choose Rails” articles have re-surfaced in the last couple of weeks. They say things like:

  • Ruby is too slow
  • Rails is too much
  • Rubyists should look into the fast-food industry for a backup career

What do I think? I think Ruby is tool. A really great tool. And great tools tend to weather the test of time. Use the tool properly and it will always be in your toolbox.

My question this week is, can you give an objective argument one-way or the other? Without trolling or looking through Ruby-colored glasses? Will Ruby still be in widespread use in 2 years? 5? 10?

1 Like

This is a great question.
My opinion, without any bias, is that ALL the most commonly used langauges are regularly used because they have adapted.
I used to write very large applications in COBOL (I am almost ashamed to admit it). Fortran and COBOL are dead because they were not flexible. C and C++ continues very, very strong in large part due to its adaptability.

We tend to get very emotional about our tools. As you stated they are only tools. It is difficult to give up a comfortable and familiar workhorse. Most of those ‘complaints’ about Ruby are legends that have lingered. Those things WERE, at one time, true. They are no longer.


Where do I get an application to work in a Wendy’s?

Great question and also a great answer.
I think Ruby needs to solve its problem with parallelism, then it should not get eaten by other languages.

The thing with “dying” has something to do with Ruby not being considered cool anymore. Personally I think there has never been a better time for Ruby. We have bundler, gems for everything, lots of options, Ruby is getting more effective, we have JRuby and Rubinius, great community and supporting tools, etc.

Maybe it’s Rails that people move away from, or maybe not.

As a bit of an outsider to the question (I don’t know the first thing about the language), I think there may well be something to that. I was talking to GA in Austin earlier this year, particularly about their Web Development Immersive course. The person I was talking to was telling me that they were busy moving the core of their course across from Ruby/Rails to NodeJS, because “that was what all the companies were looking for”. There was a distinct hint of ‘fad’ around the way it was being told.

Good points all. I am working on a project that uses Node on the front-end and rails-api for all backend services and so far it’s great. I agree with @ollie about parallelism, though. The GIL needs to go away.

I’d say that removing GIL is not really enough, there is something missing, something that will not let you shoot yourself in the foot too easily. In this video Matz says he and his colleagues are investigating a few concurrency models https://youtu.be/bqWBB8-iEac?t=35m43s (RedDotRuby 2015 - Keynote: Super Dry Ruby by Yukihiro ‘Matz’ Matsumoto), I wonder what it will be and if it’s going to be a bigger change or just a neat addition.

Just remembered this talk https://www.youtube.com/watch?v=0MojR1XUEc0 (LoneStarRuby 2015 - Surviving the Framework Hype Cycle by Brandon Hays).

1 Like

Well one thing I dont quite understand is why Ruby doesnt have a JIT compiler since its slow. Javascript used to be slow too, but with the introduction of JIT compiler, node.js actually is much faster than PHP now. Is there any difficulty with JIT compilers? I know that the PHP world is trying to implement one such compiler too, just no idea when it will be available.

Hey @Hall_of_Famer, DYK that Rubinius and JRUby both have JIT compilers? Your post inspired me to do some research on it, and I found this post by Pat Shaughnessy, which is interesting. Benchmarks like this one seem to say that performance is pretty close, and I think JRuby will be the fastest (once the JVM is up, optimized, given the significant resources it needs, etc.). I am not sure about JRuby 9000, as it’s still warm from the oven.

For the last 5 or so years I have been on teams that heavily used Ruby. Ive been noticing (and this is all just personal observation) that there is a definite trend away from Ruby to things like node, clojure, scala, elixir. Is it dying, i dont, think so, is it going away, i dont think so. In 2 years will other developers look at ruby, like an overwhelming number of ruby devs i know look at php, probably, im already seeing this happen.

Ruby made heaps of developers lives better, I know it made my life better, but I feel the world has moved on and its getting farther and farther behind.

And the argument about jruby being fast and having concurrency i feel is moot, its like saying erlang can be written as a lisp because of LFE, sure it can, and its well done, by people much smarter than myself, but nobody i have ever heard say “jruby has concurrency” as far as I know has actually used it in production. The attitude is always “when we need concurrency we will switch to it then” but by the time they need concurrency they have a monolithic rails app, with heaps of mutable state/shared resources, an underlying architecture that isnt thread safe, and way to many gems that dont have up to date jvm based counterparts, if they have counterparts at all.

There is quite a bit of talk here (in melbourne australia) these days about elixir and phoenix, many of the bigger local ruby names are looking more and more into it. But that will be interesting too, I can see many of them getting into it, being all "this is so close to ruby and rails, its like im productive right out the door, and then I think they will run into the concept of an erlang supervisor and back the NOPE away.

TL:DR - ruby isnt dead, its gonna be around for a long time, people will just look at it with the contempt that many ruby devs look at php these days.

We are using JRuby in production on some (API) projects and it has worked fine. But then again, we don’t have an exact clone in MRI so we can benchmark it and we are not using Rails. :slight_smile:

Well if there are JIT compilers for Ruby, then why isnt a JIT compiler included for the default ruby package? Or in other words, why Ruby hasnt implemented a JIT compiler at its core like node.js did, given its performance bottleneck as compared to other languages? As far as I know, on shared webhosts that provide ruby and ROR, their default installation of ruby does not have JIT compiler(while node.js on any webhost will have a JIT compiler bundled). You need to have at least a VPS or even dedicated server, to install Rubinius or JRuby, which means that ruby will at least be very slow on the majority of websites that use this language, since most websites are on shared hosts.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.