Article  |  Development

8 Useful Ruby on Rails Gems We Couldn't Live Without

Reading time: ~ 3 minutes

8 Useful Ruby on Rails Gems We Couldn't Live Without

The open source community is what makes Ruby on Rails such a powerful platform. By implementing helpful open sourced Gems, Ruby on Rails developers can adapt and build the exact features needed for a project – without wasting time building everything from scratch. And while Ruby Gems are created on a daily basis, not every single one is a home run.

Sifting through dozens of Gems to find the perfect fit can feel like a Goldilocks mission. Luckily, we’ve tried and tested our share of Gems while building Ruby on Rails applications across a wide range of industries. Here are the eight best Ruby Gems our development team has used in 2017. They’ve all been put through the ringer, tested, and come with an official Argonista stamp of approval. Check them out:

John Cech, Backend Developer

Pundit – User Authorization

Someone new to web development (or outside stakeholders on a project) might confuse authorization and authentication. Authorization decides what abilities a user has on a certain application or website. If you’ve ever received an error message that you didn’t have proper admin rights to perform a task on an application, you’ve seen user authorization in action.

Pundit solves common authorization issues in the most “Rails” way possible. It’s easy to configure and customize across a wide range of applications. It’s a super useful Gem to keep in your back pocket.

WebPacker – Javascript Management

JavaScript is constantly changing. For years, Rails has lacked a simple bundling system for JS assets. Webpacker resolves this by allowing you to decide how to manage assets. It’s a handy tool to familiarize yourself with, as this methodology is likely the future of how we serve up assets that were previously provided by Rails sprockets. This gem will also be baked right into Rails 5.1.

Webpacker bundling for JavaScript assets

If you’re still on the fence about updating your Rails app, this is just one of several additions that will increase efficiency. Plus, here’s three more reasons you shouldn’t wait to update.

Robby Russell, Partner

Smarter CSV – CSV Import

The process of importing massive CSV files into an application’s database can be a doozy. Unlike most CSV parsers, Smarter CSV can process the stream in smaller sections. This was a big help on a project where the existing import process was timing out on spreadsheets with large amounts of records.

Bundler – Audit

Updates and fixes can leave your program with small security vulnerabilities that are hard to catch. Bundler performs a thorough audit of your application’s Gem version and produces a report of any security issues that need to be patched. Each issue is given a level of criticality and upgrade solutions.

Scott Dudley, Backend Developer

Rails ERD – ActiveRecord Diagrams

In the discovery phase of an existing application, learning how different models in a project relate to each other can be a tedious and confusing process. Rails ERD generates diagrams of your ActiveRecord Models to help you visualize connections and dependencies.

Gem for ActiveRecord Model diagrams: Rails ERD

It’s a major headache-saver for any developer who learns visually.

Chartkick – Chart Creator

This gem creates stunning Javascript charts with one line of Ruby, saving you time spent working with charting libraries. While it’s not the most extensive data visualization tool, it’s speedy. You can go from nothing to engaging charts and graphs in just a few minutes.

Gem for creating charts in Ruby: Chartkick

Kathryn Carr, Backend Developer

Annotate – Annotate Rails Classes

New developers or anyone working on a large application with a complex data structure will find Annotate to be a lifesaver. This Gem annotates Rails classes with schema and routes info. On projects where the schema is kept in sql format, Annotate will save you from looking at migration files or spinning up an instance in the console when you need to know about the attributes on a model.

It’s a big time saver on large scale projects.

Brian Middleton, Frontend Developer

MetaTags – SEO-Friendly Rails Apps

SEO can sometimes feel like deciphering hieroglyphics. Experts guess on new aspects of Google’s algorithm nearly every week, but there are a few staples of SEO that have remained integral for years. MetaTags simplifies SEO by allowing you to easily set all of the tags and descriptions you need for your web page.

This SEO Gem handles canonical URLs, Open Graph tags, Twitter tags, titles, descriptions, and more. You can even set defaults for particular pages.

Over to you

We're constantly on the lookout for new Ruby Gems to try. What Gems have you discovered recently that have been a big help? Leave a comment below or shoot us a Tweet and let us know!

Have a project that needs help?