🇺🇦 #​596 — March 24, 2022

Read on the Web

Ruby Weekly

gem-compare 1.0: A RubyGems Plugin to Compare Gem Versions — Josef created this to help vet new versions of gems he was forging (to see accidental changes, files erroneously added to the gem, license changes, etc.) but you could use it for any sort of cross-version curiosity. Once installed, give gem compare gem-compare 0.0.7 1.0.0 a try to see it working on itself.

Josef Strzibny

Monthly Fixed Price CodeCare That Doesn’t Cost the Earth — CodeCare is a professional service with a dedicated team. You get: minor feature development • code tweaks • updates • security patches • bug fixes. All for an affordable monthly fixed price.

CodeCare by reinteractive sponsor



Senior Rails Engineer @ Nebulab (Remote) — Join our distributed team and build high-volume eCommerce applications in a workplace made by developers for developers.

Ruby on Rails Developer — Remote-first RoR Consulting & Development firm working with entrepreneurs and startups to build modern and scalable applications.

Build Your Career from Anywhere — Join Toptal and get access to exclusive remote work opportunities for the top companies on the planet.

📕 Articles & Tutorials

Changing Critical Code Paths with Scientist — GitHub’s Scientist is one of those gems that, when paired with the right use case, can really reduce anxiety, increase confidence, and make change easy, just like it did here for HEY.

Jorge Manrubia (Basecamp)

▶  How To Build a Powerful Search Form with Hotwire — I know, there’s a lot of Hotwire content these days, but this video did teach something new (turbo_action to manage the URL).

Mix and Go

Getting Started With OpenTelemetry — Learn best practices and understand what observability can do for your organization. Tools, key concepts, and more…

InfluxData sponsor

Things to Consider When Upgrading Ruby from 2.7 to 3.0 — For those of you that haven’t done so…

Cleviane Costa (FastRuby.io)

Hotrails: Learn Modern Rails with Hotwire — This is one of the best tutorials on Hotwire (and Rails, too) we’ve seen in quite some time. It’s in eleven parts and really demonstrates how the pieces of Hotwire function.

Alexandre Ruban

A Quick Guide To Managing User Permissions in Rails Apps — Sure there are lots of authorization gems, but creating policy on your own is pretty easy and gives you one less dependency.

Renata Marques (Honeybadger)

How to Setup Heroku Autoscaling in Under 15 Minutes? — Sure, this goes on to showcasing Dynoscale’s offering, but does start with how and when to use Heroku’s autoscaling feature first.

Eric Abrahamsen (Dynoscale)

🛠 Code & Tools

RailsAdmin 3.0: A Rails Engine Providing a Basic CRUD Interface — Supporting apps built round both Active Record and Mongoid, RailsAdmin gives you an interface for basic manipulation and management of your app’s data. As of 3.0, Rails 7 is now supported. Demo app.

Rails Admin Team

DSL Factory: A DSL to Create.. DSLs! — At the risk of getting a bit meta, DSL Factory aims to abstract away the task of defining a DSL into a DSL of its own. It does validation too.

Tom Rothe

JRuby Released — The 9.3 branch remains compatible with CRuby 2.6. adds improvements to Java integration, aarch64 and M1 support.

JRuby Core Team

Monitoring and Observability: An Ever Evolving Market

Scout APM sponsor

online_migrations: Catch Unsafe Postgres Migrations in Development and Run Them Easier in Production — The README alone is worth the price of admission, but using the gem might save you a few headaches with dangerous migrations on large tables.

Dima Fatko

Roo 2.9: Read All Common Spreadsheet File Formats in Ruby — Covers Excel 2007-2013, LibreOffice ODS, CSV, and lesser used Excel formats.

Daniels, Simonov, et al.

curl-to-ruby: Convert Curl Commands to Ruby net/http Code — There are lots of fantastic HTTP client options for Rubyists nowadays but net/http works everywhere out of the box which makes this tool still potentially useful.

John Hawthorn

Standard 1.9: A Ruby Style Guide, Linter and Formatter
test double

💡 Tip of the Week

Getting clean with gem pristine

Last week, we discussed using bundle open to edit a local version of a gem. Once I've finished debugging an issue using bundle open, I'm often left with miscellaneous remnants of that debugging process: various puts statements or binding.irb calls which I no longer need.

Thankfully, gem pristine <gem_name> can resolve this problem by restoring a gem to its cached (or 'pristine') version. In other words, the gem will no longer have the extraneous lines of code that were added during debugging.

If we're interested in restoring more than just a single gem, we can run gem pristine --all to restore all gems for our current Ruby version.

This might mean, though, that we clear more gems than our current application is using. The last helpful command for restoring gems is bundle pristine which will restore all gems which are in our repo's Gemfile.lock - so all gems that a repo is using, but not necessarily all gems for our current version of Ruby.

This week’s tip was written by Jemma Issroff.