Recently on Bluesky, there was a #20DayGemChallenge where we were encouraged to choose 20 Ruby gems that we’ve used time and time again, or have inspired us in some way and post one gem per day in no particular order and with no explanation. This series of posts explains my specific reason for choosing each of these gems.
As a general guide, I tried to pick slightly unique gems in the hope that it would help others discover something different rather than the obvious ones that are always being discussed. Also, I wanted to pick gems that had some significance to my use of Ruby (or Rails) over the past many years.
So, let’s get started. Each post has 5 gems.
- Part 1: Gems 1 to 5
- Part 2: Gems 6 to 10
- Part 3: Gems 11 to 15
- Part 4: Gems 16 to 20
Gem 11: yard
For some reason, yard
has always been a favourite of mine for documenting Ruby code. Maybe, it feels familiar and similar to tools like Javadoc or Doxygen. It’s available at https://github.com/lsegal/yard and more information is available on the Yardoc site.
If you’re like me, and get uncomfortable by not knowing which parts are not documented, refer to this post that explains how to find undocumented code in your codebase.
Gem 12: Jekyll
There’s not much to say about Jekyll – I use it all the time since I use it for this site. It’s an excellent static site generator and I have used it for a few years. Find the source at https://github.com/jekyll/jekyll
Gem 13: Gruff
Gruff describes itself as a library for making beautiful graphs. Although it needs rmagick (and Imagemagick), it is very handy. I remember using it more than 15 years back for generating a few hundred graphs of data so that I can browse through the images to find the ones that needed further investigation rather than going one by one in Excel or something else. I also used it quickly generate images that could be added to documentation. Find it at https://github.com/topfunky/gruff
Gem 14: actionmailer
A lot of Rails users are very familiar with actionmailer
, available at https://github.com/rails/rails/blob/main/actionmailer/README.rdoc since it’s the default way to send emails from Rails applications. I also like it a lot because it is “a great library to be used outside Rails”"/2020/using-ActionMailer-outside-Rails/ for sending emails and benefiting from convention over configuration, templates, etc.
Gem 15: roo
The last gem in this part is roo
from https://github.com/roo-rb/roo – it’s a gem that implements read access for common spreadsheet types including Excel. It’s a common go-to library for me when we read data from Excel files. It’s simple and just works!
That’s all for Part 3. If you have any other thoughts or questions, feel free to comment below, or connect with onghu@x or @onghu@ruby.social on Mastodon or @onghu.com on Bluesky to discuss more.