Welcome to the Gem Teardown for the 2013 Rails Rumble. For background, the Rails Rumble is a competition where teams have 48 hours to build a Rails app from scratch. Teams compete for fame and sweet prizes provided by the Rails Rumble sponsors. The contest wrapped up last week and the winners have been announced. Congratulations to everyone who participated!
I analyzed 221 Gemfiles. Read on to learn how the teams were able to create such amazing apps in a weekend.
The basic Rails stack:
Note for the pedantic: Yes, I know that Coffeescript and Sass are both included in the default Rails Gemfile.
This was an eye opener for me - a ton of the Rails 4 teams turned off Turbolinks. I guess the speed boost doesn't outweigh the caveats. Proceed with caution!
MySQL and Postgres were evenly matched at 43% and 37% respectively. Mongo clocked in at an impressive 12% despite all the chitchat on HN. A handful of teams ditched the separate db entirely and used SQLite.
Nine teams used Redis and twelve used Memcache via Dalli. I would've expected more usage, frankly. Those tools are indispensable for me and nearly everyone else trying to build a scalable web app.
I'm curious how many people actually have time for BDD during the 48 hour competition. It's impossible to count tests by reading a Gemfile.
Among those who bothered to specify a server, 20% used Unicorn, 11% used Thin, and 8% used Puma. Puma has some DNA from Mongrel. I don't personally know anyone on Puma and I was surprised to see such a strong showing. Read more about Unicorn vs. Puma here. Note that the default install for the Rails Rumble uses Apache + Passenger, so a web server isn't really required.
13% of the teams used Mina for deployment. Perhaps the recent jump to version 3 will clear some of the cobwebs from Capistrano.
Compass and Bourbon both aim to provide a comprehensive set of Sass mixins to take the pain out of writing CSS. I'm mildly ashamed to admit that I mostly rely on the mixins provided with Bootstrap. Bourbon looks to be gaining traction, possibly due to its relationship with Neat. A couple of teams used both libraries for ultimate CSS power!
This continues to be a crowded and competitive space, with Honeybadger opening up a slight lead over the New Relic juggernaut. Personally I wish that one of these services would find a way to replicate the awesomeness of Crashlytics, minus the denim. Reminder note to self: don't create a startup to handle 500 errors.
An amazing 46% of the teams used Devise for authentication, often with an OmniAuth plugin to facilitate logging into Facebook, Github or Twitter. If you have user accounts, you should probably be using Devise.
37% of the teams added Better Errors, which dramatically improves the standard Rails error page. You can even get a console in there, which is awesome/terrifying.
33% of the teams kicked IRB to the curb in favor of Pry. Have you ever wondered what it would feel like to
cd into an object? Take a walk on the wild side!
Honorable mention goes to Guard, which watches your filesystem and responds by running commands. You can make it magically re-run your tests or refresh your browser in response to a template change, for example. Neato.
Let's face it. If you only have 48 hours to create an app, wouldn't it help to piggyback on someone else's business? We're all standing on the shoulders of giants. Here are the most popular third party APIs used in the contest:
|Gem||# of teams|
|aws-sdk & fog||18|
|gravatar_image_tag & gravatar-ultimate||9|
|mandrill-rails & mandrill-api||4|
Finally, I'd like to use my editor's pen to highlight some of the fantastic and fantastically quirky gems that were used for the contest. Definitely check them out: