Ruby on Rails Gems We Love!
We love Ruby on Rails and we love the community that supports it. Not only do we find the core framework is a joy to work with, but we also have a handful of Gems that we are quick to add to any project that we work on. We've noticed that over the years this list has changed -- but not that much.
Below we'll take a quick look at the Gems we love to use within our Rails projects, how we make use of them and why you should consider trying them out in your project.
We have migrated all of our projects off of Webpacker to Vite. We've found that Vite is not
only faster in development and production but that it helps with our DX by offering simple
and effective page reload on code changes and hot module reloading within stimulus. We've moved
|acts_as_list||We often run into managing lists in our apps. That includes ordering, re-ordering, inserting and removing. This gem makes it very easy to facilitate drag and drop reordering in a couple of lines of code. Scoping lists has been a life saver and allows lists to exist within the context of a parent element.|
Discard makes soft-delete easy. We use this virtually everywhere and have ingrained the use of
This gem makes checking emails easy. Now, with the more recent versions of Rails there are some other
features, but we have found
Like you, we've moved around between all of the main pagination libraries over the years. We've stuck to
|bootstrap_form||This is something we do want to revisit, but it is a gem that we have used on every major project that we've delivered in the past several years. This gem makes generating Bootstrap forms easy, including error messages and layouts.|
Newer to our repertoire but an invaluable tool to create encapsulated, reusable components within our
code. We love this one so much that we created a set of metrics widgets that leverage
Sending notifications is a staple of applications and
Multi-tenant, multi-role applications were a huge pain to debug in years past. It was a matter of
creating known passwords and doing a lot of sign in and sign out. With pretender, it is really simple
to add the ability to switch between users. We typically build in a
This is one of the first gems we add to a project (right after
Tracking login activity is also very helpful for support and security stakeholders.
|ahoy_matey||We use this gem to track basic application metrics and events. We use it A LOT. We've found it to be a very effective tool for not only tracking a great deal of usage statistics but also to help track generic event data for in-app business processes.|
|groupdate||Thanks to this gem, we are blissfully unaware of how to efficiently group things by date (in psql). Grouping by day, week, month etc.. is all a matter of adding an extension to a query.|
How We Pick Gems
There is a lot to this process in terms of both qualitative and quantitative aspects. Below we'll capture some of the main things that we consider when selecting gems.
- Community. We believe in numbers and we respect and appreciate that we have a huge community of really smart peers. We mostly frequently discover new gems from one of two places; blog posts or newsletters like Ruby Weekly and Hotwire dev newsletter.
- Project Health. Once we find a project that looks interesting and either solves a need or gives us a way to wow users, we then dig into the backing GitHub project to see the state of the code. At a very high level, we're looking at issue open/close rate, code freshness and generally the "tone" of the participants.
- Does it Work! Well, "work" is very overloaded in this context, but is it easy to get the gem integrated, does the interface feel right and does it play nicely with the rest of our application. This is an oddly artsy piece of the puzzle but ultimately results in our go/no-go in using the gem.
Have a gem that you love to use in your projects? We'd love to hear about it!
If you are interested in not only telling us about the gems you love, but joining our team to make use of them then please have a look at our open positions!.
About the author
Chris has spent his career admiring and analyzing high performance teams and organizations in tech. He is now fortunate to lead one of these teams.