Share your favorite/useful gems!

Learning which gems to use has always lead to a couple hours of scouring github, or other blogs to find out which ones are most useful. I’d like to see which ones you use and how they’re useful. I’ll start with one:

“Did You Mean?” GEM. This bad boy is great for correcting misspelled methods or classes. Great for beginners to use in your test/production environment. It’s sort of like linting for Ruby, but for run-time fixes.

I’ve really enjoyed using attr_extras:

From their readme:

Instead of

class InvoiceBuilder
  def initialize(invoice, employee)
    @invoice = invoice
    @employee = employee


  attr_reader :invoice, :employee

you can just do

class InvoiceBuilder
  pattr_initialize :invoice, :employee

I’ve enjoyed the convenience of seed_migrations, which creates a concept of data migrations you can use to separate modifying the structure of your database from setting up reference data or converting existing data. You can tie running data migrations to running schema migrations, or run them separately.

Wow that’s super useful for my workflow! Thanks for that Ben!

Really convenient Geoff! I think I’ll try this on my current project