If you were a startup trying to get an MVP out the door in 2010, admittedly you probably used or considered Ruby on Rails. In 2015 you are probably more than likely going to opt for Node.js instead. But why?
Once upon a time it seemed as if Ruby on Rails was destined for global dominance. Twitter was originally built on top of it before moving for scalability and performance reasons, but many companies still use Ruby on Rails.
Some notable companies still sporting the faded Rails band t-shirt include; Github, Shopify, Twitch.tv, Imgur, Airbnb and the list goes on.
Rails is definitely not dead, however you can’t deny the trends for Rails usage are going down, not up. It is no longer considered to be the only darling of the startup world like it once was.
So.. what happened?
While the appeal of Ruby on Rails was very much its plethora of generators and other CLI goodies that made it easy to scaffold an application in a matter of minutes: Node.js happened.
Then there is the history of well-documented performance problems plaguing the framework, more publicly Twitter’’s move away from the framework.
Ruby on Rails was never marketed as a performance-first framework, it was marketed as a framework you chose when you wanted to get shit done and as quickly as possible. There is no denying that Rails delivered on that promise.
As you can see comparing Google Trends data for Ruby on Rails and Node.js paints a very clear picture:
The appeal of Rails was not only attributed to the fact there was nothing really like it at the time (unless you consider Django and Django). PHP was the dominant language when Rails made its debut and people jumped ship because the PHP hate-train was speeding down the tracks.
Of course, there were other reasons that can be attributed to the early success of Rails. The inbuilt ORM, the scaffolding functionality and ability to generate an entire application using a few simple CLI commands appealed to many of us as developers.
Ruby on Rails isn’t dead
While RoR is alive and well, it just isn’t the flavour of the week like it used to be. It seems Node.js has won out, but that isn’t to say that Node itself won’t be replaced by something in the future.
There is still a community behind Ruby on Rails, albeit not as vocal or big as the Node.js community. It is far from dead, but we have to wonder if there will come a day when Rails falls behind even further.
It isn’t exactly a fair comparison to compare NPM modules and Ruby Gems, as Gems are not Rails specific but rather the package manager for the Ruby language itself.
The activity on the Gems stats page does give you insight into the number of downloads there have been of Rails though.
So let’s compare the number of downloads of Express (a framework for Node.js) and Rails (both installable via their respective package managers). Both similar in that they are frameworks built on top of an existing language/library.
In the last month (so February 2015) there were 2,171,225 downloads of Express. Compare that to the number of downloads via Ruby Gems for the latest version of Ruby on Rails released December 20th, 2015 which have only totaled 541,249 in a two month period since its release.
Express had four times the number of downloads in the last month compared than Rails has had in the last two months. The numbers paint a picture of a framework not nearly as popular as it once was.
For update stats on Ruby Gem packages click here. For Node Package Manager statistics, simply visit their site and they’re displayed at the top of the homepage, individual stats are available on a packages detail page.
Looking to the Github repositories of Rails and Node.js, you can quite clearly see that Rails is being updated on a regular basis. Comparing the two, however, is more difficult stat-wise as Joyent don’t adopt such an open community model like Rails does.
Rumours of Ruby on Rails’ demise have been greatly exaggerated. Rails is not dying, you just forgot about it along with most of the other trend-riding chumps. Or your needs outgrew what Rails could provide you.
The stats quite clearly prove that Rails is not dying, but they also prove that it isn’t growing as much as Node.js is (or to be more specific and fair: Express). The community is still contributing to it and people are still using it.
At the end of the day, use whatever works for you. Don’t believe the hype around a framework or language, if you like it and it meets your needs, then there is no wrong choice.