DEV Community

loading...

Discussion on: I'm a Rubyist for ~15 years and CTO of a Rails consultancy, Ask Me Anything!

Collapse
citizen428 profile image
Michael Kohl Ask Me Anything • Edited

I'll leave out all the obvious ones that most Rails projects seem to use (e.g. pg, pry, devise, sidekiq). I also generally try to keep the number of gems to a minimum, e.g. by not dragging in an API client gem when all I need is to hit one endpoint.

In no particular order:

  • bundler-audit: Verifies your Bundle against the Ruby Advisory Database. I make this part of our CI pipeline so we can't deploy when we have vulnerable gems.
  • pundit: simple OO authorization
  • fast_jsonapi: JSON serialization. It's quite new and still has a few rough edges, but it's fast indeed and I like that it's rather explicit
  • secureheaders: sane defaults for security headers, by Twitter
  • lograge: less verbose log output in production
  • heroku-deflater: allows to serve your content gzip compressed when hosting on Heroku
  • nakayoshi_fork: Written by Koichi Sasada, this can potentially save quite a bit of memory when running forking servers by making Ruby's GC more copy-on-write friendly.
  • bullet: finds N+1 queries. Can also be used in RSpec so your tests fails when you introduce a new one. Also detects unnecessary eager loads.
  • nullalign: I'm a stickler for data consistency and properly using our RDBMS.
  • methodfinder: my own gem, but I do use it when teaching Ruby.
Collapse
rhymes profile image
rhymes

Thanks for pointing me to secureheaders and also nullalign :-)

I'm a stickler too for having constraints in the DB, you never know where data is going to come from :D

Thread Thread
citizen428 profile image
Michael Kohl Ask Me Anything

In that case you might also want to check out ActiveRecord::DatabaseValidations.

Thread Thread
rhymes profile image
rhymes

Thanks. I think this stuff should be the default in a widely used framework like Rails.

Collapse
ben profile image
Ben Halpern

I definitely have my eye on nakayoshi_fork.