My Favorite Ruby gems
Tags: ruby, rubygems
Published: 2019-10-17 17:24:06

---
title: My Favorite Ruby gems
published: true
date: 2014-09-01 00:00:00 UTC
tags: ruby, rubygems
canonical_url: https://www.theparticlelab.com/my-favourite-ruby-gems/
---

Many tasks that would otherwise take hours or days to build can be easily implemented by simply including the relevant Ruby Gem in your project. Here’s my pick of interesting, useful and most-importantly time-saving gems:

> What’s a Ruby Gem? Ruby and particularly Rails have an excellent developer community providing numerous open-source (usually) libraries called Gems. Ruby, Gem, geddit?

Firstly, this very blog would not exist without the wonderful [Jekyll](http://jekyllrb.com/), a blog-aware static site generator. I also often use [Sinatra](http://www.sinatrarb.com/) for smaller sites that don’t require a large framework like [Rails](http://rubyonrails.org/).

When it comes to authentication my first port of call is always [Devise](https://github.com/plataformatec/devise). This, along with it’s various extension gems, covers any sort of authentication you could want: Username/Email & Password, Oauth (Facebook, Twitter etc), and Mozilla Persona to name but a few.

[FlagShihTzu](https://github.com/pboling/flag_shih_tzu) allows you to store numerous boolean fields in a single numeric database field within ActiveRecord and access them all as though they were individual fields. [Kaminari](https://github.com/amatsuda/kaminari) has replaced will\_paginate as my pagination gem of choice.

[cache\_digests](https://github.com/rails/cache_digests) enabled a russian-doll style nested caching mechanism within view that can produce huge speed improvements. Read more about this on the signal vs noise blog post [how basecamp next got to be so damn fast](https://signalvnoise.com/posts/3112-how-basecamp-next-got-to-be-so-damn-fast-without-using-much-client-side-ui), under point #2.

[ActiveAdmin](http://activeadmin.info/) build beuatiful admin interfaces quickly and simply, which is a great place to start when building the back-end services required for any web application. [lograge](https://github.com/roidrage/lograge) reduces the Rails log output of most request down to a single easily-parsable line, great for searching and troublshooting.

I’m a big fan of [Heroku](http://heroku.com/) so obviously I use a few gems that are particularly useful here: [rails\_12factor](https://github.com/heroku/rails_12factor) enforces a couple of aspects of the [Twelve Factor App](http://12factor.net/) that Rails/Heroku don’t by default, [font\_assets](https://github.com/ericallam/font_assets) ensures your font assets are served with the correct headers to enable browsers (mainly Firefox) to use them correctly, and [heroku-deflater](https://github.com/romanbsd/heroku-deflater) gzips just the content that would benefit from such compression without wasting CPU cycles compressing content that does not (it will also serve any existing .gz file).

Many of my favourite gems are solely for use during development. [quiet\_assets](https://github.com/evrone/quiet_assets) will keep those noisy asset related request lines out of your development log files. [meta\_request](https://github.com/dejan/rails_panel) and its RailsPanel Chrome extension gives you access to information about each request in Chrome’s developer tools, here it is in action:

[better\_errors](https://github.com/charliesome/better_errors) makes the built-in rails error pages about a thousand percent better by giving you a fully interactive console in your browser at the point of the error, or any parent frame. I recorded a short screencast demonstrating this last year:

<iframe width="100%" height="100%" src="https://www.youtube.com/embed/qScAQx7glRE" frameborder="0" allowfullscreen="" loading="lazy"></iframe>

These are just the tip of the iceberg, [RubyGems.org](http://rubygems.org/) has nearly 90,000 gems listed. What are your favourite gems? Let us know.