As years go by, there is always a question whether Ruby is dead or alive, and as usual, we have done our research and compiled some statistics about Ruby’s 2018 lifeline that might help you find an answer.

2018 was an interesting year in terms of gems. Some increased and some decreased their download numbers. Some were well maintained, while others could have used a helping hand. We have also seen a few newcomers that almost made it to the top of their categories. As for the language itself, at the end of 2018, Ruby 2.6 was released, getting us a few steps closer to achieving the Ruby 3x3 goals. The most notable improvement in this release was the brand new (experimental) JIT compiler that should boost the performance of Ruby programs.

Sources

The data used for generating the statistics below was obtained from two sources - the latest RubyGems PG-dump and BestGems. The latter keeps track of all daily gem downloads and exposes this data through their API. Having that and Vedran's awesome script, which made it pretty easy to browse through the numbers, we have compared some of the most used gems.

Bear in mind, that some of these downloads are a direct result of gem dependencies, non-cached CI builds and gem mirroring services. There is still a strong correlation between the number of gem downloads and the number of its active users, but we feel it’s important to make it clear that these two numbers are not exactly the same.

Gem creation & releases

Unfortunately, this was another year in a row that the creation of new gems decreased even further. That’s not so surprising after all, because there already is a huge number of gems that are well-known, well-maintained and cover a lot of common use cases. To make a new gem in a field that’s already well covered is a real quest, but not impossible. Further down we will introduce a gem that managed to make a huge dent in the JSON:API field.

As for the creation of gems, a downhill trend is also evident in the number of gem releases. But you can’t get one without the other. Older and well maintained gems usually get a few new minor releases and a major release in a calendar year. Newer gems which are still in infancy usually have more code churn, breaking changes and consequently releases.

Rails downloads

In 2018, the number of Rails downloads has increased again. It had its ups and downs, but it held around the 3 million download mark. As the end of the year came we heard a lot about the new major release, Rails 6. People jumped on the hype train raising the number of monthly downloads to almost 4 million.

Action Mailbox, Action Text and parallel testing are the most anticipated additions, but there will be more improvements included in Rails 6. We will need to be patient though as the release is scheduled for the end of April 2019.

Other web frameworks

Sinatra - still falling behind

When Sinatra got a new maintainer in 2017, and they pushed a new 2.0 release, things started to look better and the upward trend continued into 2018 as well. Having just five patches throughout the year they reached 1,5 million downloads as their monthly standard, pushing it to the all-time high of just above 2 million downloads at the end of 2018.

On the other side of the download spectre, Padrino yearly downloads fell by 10%, while Hanami downloads increased by about 33%. Hanami’s core team is currently working on version 2.0, which could be something to look out for in 2019. Their download numbers are much lower compared to Rails and Sinatra but that doesn’t retract from the fact that there are people that find them more suitable for their use cases and see potential in their further development. Having options to choose from is always a positive thing.

Database adapters

For PG and MySQL2 2018 was a great year. PG managed to increase their numbers for 4, and MySQL2 for 5 million downloads. SQLite3, on the other hand, experienced a drastic drop to only one third of the downloads made in 2017 (from 21 to 8 million yearly downloads).

Application servers

The situation here is pretty much the same as the year before. Puma, the default server for Rails, is still in the number one spot. And Thin, with no new releases in the past year, actually made a 250 thousand drop.

Unicorn, although better maintained than Thin, didn’t manage to increase the number of downloads compared to 2017. Developers behind Passenger, on the other side, are putting a lot of work into new releases, having a 6.0 version released at the end of November, and managing to triple their download numbers since 2017. They had a huge spike at the middle of the year, recording more downloads in one month than in the last two years combined.

Other ORMs

2018 maybe wasn’t the best year for Sequel, as its downloads dropped by 14%. Sequel is well maintained, and has a status that just few gems have - 0 outstanding issues. Other than that, we could mention rom-rb, that is maybe not a strict ORM, but has the same uses. It had a small growth during the year, recording just over 90 thousand downloads.

Testing

For RSpec it seems that only the sky’s the limit. Its downloads more than doubled hitting almost 200 million. Even though it's defined as a development dependency in a lot of gems, it's not used as a runtime dependency that often. The vast majority of the downloads thus stem from actual project uses. Minitest, on the other hand, gained a bit more popularity, although there are some open issues and the last release was just under 12 months ago. All in all, it’s great to see these numbers skyrocket because that just means that people are testing their programs more and that the testing culture is evolving even further.

Debugging

It is inevitable that bugs will occur during software development, but we can examine them easily using the following gems. The downloads of pry, irb’s number one enemy, jumped by 50%, but this number is eclipsed by the number of open issues - 177 as of writing this article. Byebug, which is just below pry, has a download number that is growing even faster, presumably because they started 2018 by releasing the version 10.0.

Another interesting debugging tool - Better Errors. They replaced the standard Rails error page with their own, where except from the usual stacktrace, you can also debug your code as you were in a debugger. It had a consistent growth rate that continued into 2018 as well. Well maintained and released, it is a very helpful gem to have up your sleeve.

Background workers

The situation here is the same as the year before. Sidekiq is way ahead of Delayed::Job and Resque, by 10 million downloads.. By removing even more dependencies and constantly improving and releasing, Sidekiq has become much faster and leaner than its competitors. Resque dropped a 2.0 release in November, but there are no spikes visible on our graph. Comparing it to Delayed::Job, their numbers matched each other throughout the year.

Authorization

Authorization has been pretty stable too. CanCanCan is still in the lead, while Pundit came in second with 7 million downloads less. While CanCanCan’s downloads were falling through the year, Pundit’s, on the other hand, were stable until July and then started to increase. The reason for that is the 2.0 release, which Pundit fans had been awaiting for more than two years. Pundit could take the cake and dethrone CanCanCan if the download trend continues into 2019.

Administration

It was a big year for Active Admin, its downloads doubled and it left Rails Admin far behind. Both are still well maintained and follow similar release cycles.

JSON:API Specifications

This is a big one. The most popular and talked-about gem in the JSON:API world, Fast JSON API by Netflix, which was first released in February 2018, surpassed JSONAPI-rb on a yearly download base, and it could soon become THE gem to use for JSON:API serialization. JSONAPI-rb missed a whole year in terms of releases, and at JSONAPI::Resources, the issues slowly piling up. Having that in mind, it’s no wonder that there are ever more migrations to the newcomer, that is well maintained and cared for.

File uploaders

2018 wasn't the best year for CarrierWave and it was even worse for Paperclip, which was deprecated. Both were well maintained, released often, but they managed to get just 20-30% more downloads than in 2017. Finishing the year as equals and not actually growing that much are signs that something’s off.

The reason for that is just what we predicted last year as a possible game changer - Active Storage. Available from Rails 5.2 onwards, it gained a lot of popularity and finished the year with 5 million downloads.

Shrine is another great solution for file upload management. While the numbers seem low, having been downloaded just over 300 thousand times, it offers a lot of advantages over the more popular choices, with generality, simplicity and modularity being at the forefront .

Aggregated stats for 2018

The number of Rails downloads continued to grow and reached 37,5 million. 29 new gems were published daily on average. 260 new gem releases were published daily on average. Taking into consideration just the gems mentioned in this post, total downloads jumped from 389,794,028 in 2017 to 499,035,801 in 2018. That’s a 28% increase in just one year!

Conclusion

As in the previous years, 2018 was another successful year for Ruby, and if after all of these numbers the state of Ruby is not clear to you, let us assure you that it is here to stay. We are not the only ones that came to this conclusion.

With more than 3,700 contributors, and new coming in on a daily basis, Rails is way ahead from, for example, Django that has just over 1,600 contributors. That number of Rails backers just proves that Ruby has a strong community that is involved in Rails development and makes a lot of gems that in the end, help other developers build awesome applications better and faster.

Maybe Ruby isn’t the number one language to pick in terms of performance, as there are many more performant choices. But it is clear that performance is of great importance with the latest Ruby releases just by looking at the GC and JIT changes done by the Ruby Core team. Achieving the 3x3 promise (Ruby 3.0 being three times faster 2.0) thus seems closer by the day.

So, buckle up, as there’s a lot of things about to change. And in the meanwhile, if you want to dig into the data feel free to download it here.

The colorful cover illustration was made by designer Dubravko Tuksar.