19 Must-Have Gems for 2020
Tags: ruby, rails, beginners, saas
Published: 2020-05-19 23:15:49

---
title: "19 Must-Have Gems for 2020"
description: "I use in almost every SaaS project"
published: true
canonical_url: https://robrace.dev/must-have-gems-for-saas-2020/
---

An application can only be as good as the features it is providing for its end-users. Every developer toes the line between indiscriminately adding gems and building new functionality themselves. When time is of the essence, these are the gems I reach for:

- **[local_time](https://github.com/basecamp/local_time)** - An relatively older gem and stable, but this is a gem that includes a view helper and javascript helper to display relative time (i.e. 'updated 2 minutes ago')
- **[devise](https://github.com/plataformatec/devise)** - Devise is still the go-to gem for authentication in most Rails apps. Its ease of use and existing features make it dead-simple to add authentication. For those looking for a simpler gem with a smaller footprint, [Authlogic](https://github.com/binarylogic/authlogic) gets a runner up in this list for authentication.
- **[Interactor](https://github.com/collectiveidea/interactor)** - When you start to follow the Service Object pattern, adding Interactor can help guide your context and result of those objects through a common interface.
- **[rolify](https://github.com/RolifyCommunity/rolify) and [cancancan](https://github.com/CanCanCommunity/cancancan)** - Rolify allows us to assign roles such as User or Admin then CanCanCan will enable us to take those roles and apply authorization policies. However, there is a case for [Pundit](https://github.com/varvet/pundit) for those who like the Policy Object approach's simplicity.
- **[Lockbox](https://github.com/ankane/lockbox)** - When you need to encrypt data in your database for compliance or even client security, Lockbox makes it very easy to do. Working with plenty of types out of the box, such as most database types, other Rails tools(ActiveStorage), and third-party gems(Shrine).
- **[Sidekiq](https://github.com/mperham/sidekiq)** - This is **the gem** when it comes to running asynchronous tasks. Sidekiq is backed by Redis and has been long supported by the ActiveJob Rails abstractions.
- **[Kaminari](https://github.com/kaminari/kaminari)** - A simple yet powerful approach to adding pagination into your Rails applications. In many places, it is as simple a few drop-in changes, but can be used to on anything from ActiveRecord collections to plain Arrays. It also has templates to be used in many of the most known CSS frameworks such as Bootstrap.
- **[Bootstrap Email](https://github.com/stuyam/bootstrap-email)** - Take the guesswork out of email design and CSS inlining inside of Rails Mailers. This gem allows you to use Bootstrap-like HTML structures, use a Bootstrap like design, and inline the CSS to work in most email browser/apps. Quite the timesaver!
- **[money-rails](https://github.com/RubyMoney/money-rails)** - This will help standardize around common issues found when calculating money as well as providing a few template helpers.
- **[Rack Mini Profiler](https://github.com/MiniProfiler/rack-mini-profiler)** - Everyone should know what their application is doing and where it is spending its time. This gem adds a profiler to the development pages and can include some nifty flame graphs when you really want to dig into the data.
- **[rspec-rails](https://github.com/rspec/rspec-rails), [factory_bot_rails](https://github.com/thoughtbot/factory_bot_rails), [simplecov](https://github.com/colszowka/simplecov)** - I personally like to use RSpec over the default Rails test framework. Though, the community can be quite divisive on testing tools! With every test suite, I include FactoryBot to easily spin up objects for those specs and SimpleCov to dig into my test coverage.
- **[letter_opener](https://github.com/ryanb/letter_opener)** - Still my #1 gem for working with email in a Rails app. In your local development, it catches the outgoing mail and opens in a browser, rendering it as it would an email.
- **[Faraday](https://github.com/lostisland/faraday) or [HTTParty](https://github.com/jnunemaker/httparty)** - When I am looking to handle an extensive HTTP API or system, I will reach for the infinitely configurable Faraday. Still, when there are only a few HTTP interactions needed, HTTParty is super simple to use to make HTTP calls.

---
Note: This list is the type of content you would find in my upcoming book [Build A SaaS App in Rails 6](https://buildasaasappinrails.com). The book guides you from humble beginnings by deploying an app to production. The book is now in pre-sale (but not for long), and you can grab a free chapter right now!