Another year is behind us and many things have changed in the web development world - the number of JavaScript frameworks continues to grow, new programming languages are being developed faster than ever and people are still talking about the death of Ruby and Rails.

We did a little research on the use of Ruby gems and created some stats for 2016 which prove otherwise.

Sources

At the beginning of last year we used the official Rubygems data dumps which consisted of a Postgres database and a Redis store to create an overview of the Ruby ecosystem in 2015. Due to Rubygems simplifying their stack, we could no longer access some of the data we collected the previous year because their Redis instances were shut down.

However, we still used their Postgres database dump for some of the stats. Additionally, we used BestGems' API which provided us with a daily insight into the total number of downloads for any gem we were interested in.

Gem creation continues to fall

With only 16.000 gems created this year compared to 26.000 in 2014, one could assume that something is not right. My opinion is twofold. Nowadays, web development is changing rapidly, and requests for web applications are becoming more complicated. This makes our code more complicated, and therefore developers find other ways of producing code, which results in the creation of other frameworks and languages.

But the language's stability also plays a big role. We don't need to create new gems because a version of a gem that does exactly what you need probably exists already.

Gem releases going down

This is strongly correlated to the first trend. Fewer gems created, fewer bugs, fewer version releases.

Rails downloads are still increasing

If we compare the stats with last year's, there's an increase of 46% with an obvious spike in July due to the release of Rails 5.0. Unfortunately, because of Rubygems' stack simplification we couldn't get the numbers for each Rails version. But, by using a little math, we calculated that there were around 1.78 million downloads of Rails 5 and around 2 million downloads of Rails 4.2.7. The rest went to prior versions.

Rails alternatives in 2016

Sinatra - used 95% less than Rails

Sinatra is being used 95% less than Rails, which is not bad at all considering Rails is the number one go-to framework for Ruby. Comparing the numbers from 2015, we can see an increase of 15%, which translates to 2 million more downloads. Also, the average download count in 2016 was around 1 million, which was the peak in 2015.

Other frameworks have a much lower download count

Padrino, Sinatra's godfather, had many additions and fixes, including support for Ruby 2.3. Overall, it grew slightly in its total download count but still lacks active users.

Volt, the Ruby framework in which Ruby code runs on both the server and the client via Opal seems to be stagnating since there were no releases nor commits in 2016.

Lotus, a tiny web framework with a more object-oriented style than Rails, had to change its name to Hanami, because of IBM's Lotus Software. Despite having a stable version and a bigger community than in 2015, it still lacks users.

Database Adapters

Interestingly, Postgres usage blew up in 2015 and left MySQL behind, and even though its download count rose even more in 2016, MySQL almost caught up with just around 2 million downloads less during the whole year.

Mongo's usage remains consistent, with a slight increase, but it holds 1st place in the NoSQL databases category.

Application Servers

Thin, Puma and Unicorn are obviously being downloaded more and more with each passing month. Thin is surprisingly still in 1st place, but Puma will probably surpass it, since Heroku listed it as the recommended web server, and it replaced Rails' default web server WEBrick with the release of Rails 5.

Passenger is stagnating at approximately 100k downloads per month. However, it also comes as a standalone Unix package, so the stats are probably higher.

Sequel - amazingly amazing

Apparently, developers just love writing code without having to resort to custom SQL queries. The awesomely flexible Sequel database access toolkit for Ruby remains stable and is very well supported (0 issues, 0 pull requests) with releases coming on a monthly basis.

Interestingly, in 2015 they had an 180% increase in usage, which means it was downloaded a bit below 300k times per month. In 2016, it was downloaded 450k times per month on average. Awesome work, Jeremy!

RSpec - The New King of Testing

If I had to single out one thing that was talked about the most in the world of Rubyists in 2016, it's testing! Testing does save your bacon, and according to stats, we do love our bacon.

Minitest is still a runtime dependency for many gems such as ActiveSupport or Sinatra which makes the download count increase monthly, but RSpec had more downloads in November and December. This proves that developers choose to install another testing framework and hopefully don't leave only the scaffolding lines in their testing files.

We investigated why the sudden rise happened in August, but couldn't figure out the cause. We assume that a gem that had RSpec as a runtime dependency became very popular at that time.

Background Workers

Sidekiq really is faster than its competition! With the release of 4.0 in late 2015 that removed a lot of dependencies and was completely refactored for performance, it's clearly visible how it impacted Ruby developers, with nearly two times more downloads than in the previous year.

Resque and Delayed job mostly stayed the same throughout the whole year.

Authentication aka Devise for Rubyists

With Devise being the de facto Rails authentication solution, no other authentication layer could even compete. I compared its usage in 2015 and 2016, and both results reflect its increasing popularity, counting more than 6.5 million downloads.

Authorization - CanCanCan VS Pundit

In last year's blog post Damir stated Pundit should be preferred over CanCanCan. With its nice object-oriented minimal authorization, it almost caught up with CanCanCan at the end of the year, showing how Rubyists have good taste when it comes to code structure and architecture.

Administration Frameworks

Rails is a popular web framework for many reasons, one being that it also provides many choices for developers when tailoring the administration interfaces for their web applications. If you have simple model relations and a 'straight-forward' blog-like website, it is advisable to use one of the gems that provide you one.

The two most used UI frameworks, ActiveAdmin and RailsAdmin, are reaching their highest usages ever, with more than a 60% increase in downloads in 2016.

Content Management Systems

Discussing Content Management Systems can be quite misleading, since they usually depend on the architecture and business logic of a project. I advise you not to make decisions based on graph stats, but rather test them out for yourself and see what suits your specifications best.

We crunched the numbers for the most used ones, and there were no great differences when compared to previous years.

RefineryCMS is a well known CMS that is designed for end users to create all of the website content. It is simple to use, flexible when designing and extendable.

AlchemyCMS is more developer-oriented because it is more flexible in certain situations. Only the content itself is manipulated by the end user, not the HTML attributes of the page. Everything else is persisted to the database.

LocomotiveCMS uses Wagon, a command line tool for creating pages and other content on your local machine. It has a very flexible and nice admin interface, a great community but unfortunately not a lot of users.

Pagination

This comparison surprised me since I'm a Rails developer coming from the online school of Michael Hartl that gives an example of pagination using the will_paginate gem. However, looking at the usage statistics from previous years, kaminari was always in the lead. If you haven't heard about it, definitely give it a try. It provides a clean, flexible solution with scopes that is also highly configurable.

File upload Solutions

Even though Paperclip leads with the total number of downloads, CarrierWave took over in October with a positive trend continuing in January 2017. CarrierWave is much more flexible and offers many options in its configuration. If you're interested, check out our detailed overview of FileUpload solutions.

Deployment Tools

Lastly, as you might expect, Capistrano remains the number 1 deployment tool with over 300.000 downloads monthly. Since it has no close competition, we compared its usage statistics from 2015 and 2016. There was an increase of more than 20% with over 3.5 million downloads.

Aggregated stats for 2016

Rails was downloaded more than 24 million times

44 gems were released per day

332 gem versions were released per day

Conclusion

PHP, Java and Ruby now have one thing in common: despite obvious usage trends, everybody keeps talking about their deaths.

We are living in an era when anything slightly popular, if exploited properly, can explode and be in the spotlight for a certain amount of time. This used to be the case with Ruby on Rails. However, after many years the hype is going down.

All programming languages are good for something, but none are perfect for everything, and Rails still has its place.

Despite the rise of Ruby on Rails alternatives, developers still appreciate the benefits of a large and stable ecosystem with a mature community and easily choose a turn-key solution like Rails for rapid web development.

And Rails is keeping up with trends - Rails 5 has a pure API mode now, Yarn support, Webpack support and we're glad it's going in that direction. These three changes will help us a lot because they make up the outline of how we build web apps at Infinum.

Read, study, examine, try. Find a language that fits you most and if one doesn't work, repeat those steps. Rails isn't going anywhere anytime soon.