#507 — June 25, 2020

Read on the Web

Ruby Weekly

Building GitHub-Style 'Hovercards' with Stimulus and HTML-Over-The-Wire — HEY! What’s old is new again. The concepts behind pjax to update a page take center stage with some new tools (Stimulus 2.0) thanks to Basecamp’s new app (HEY). A great writeup.

Matt Swanson

Factory Bot 6.0: A Library for Setting Up Ruby Objects as Test Data — Last week it was the classic Shoulda testing system hitting v4, now Factory Bot has hit 6.0 (automatically defined enum traits is a neat new feature). There’s a new release of factory_bot_rails too. Great to see thoughtbot keeping these useful tools updated. #thoughtfulbot

thoughtbot, inc.

Try Redis 6.0 on RedisGreen — SSL encryption, seamless scaling, large key tracking and more, available now from RedisGreen.

RedisGreen sponsor

Rails Released — It might be a release, but it’s for security reasons, and you are recommended to upgrade. What was fixed? A vulnerability that can allow untrusted users to run pending migrations in production.

Aaron 'Tenderlove' Patterson

An Introduction to Web Scraping with Ruby — This post is split into two parts: the first runs through the basics of scraping (along with the gems used) and the second dives into a full scraping setup using Kimurai.

Pierre de Wulf

The AWS SDK for Ruby v2 End of Life Dates Announced — It’s time to move to version 3 (which was released almost three years ago, to be fair) if you haven’t yet. v2 enters maintenance-only mode in November of this year, and is completely unsupported from November 2021.

Amazon Web Services

⚡️ Quick bits:

  • It's not Ruby specific news, but for anyone who lived through the PPC to Intel transition, Apple's plan to move from x86 to ARM could certainly throw up some Ruby development hurdles to consider.
  • Somehow we missed the release of Cucumber 4.0 earlier this month, but 4.0.1 has just dropped, so we'll announce that instead 😉

💻 Jobs

Senior Software Engineer, Ruby (US, Remote) — You'll be joining a passionate team of full stack engineers building the APIs at the heart of our customers’ experience.


Find a Job Through Vettery — Vettery specializes in tech roles and is completely free for job seekers. Create a profile to get started.


ℹ️ Interested in running a job listing in Ruby Weekly? There's more info here.

📘 Articles & Tutorials

Postgres Indexes for ActiveRecord Join Tables in Rails Apps — Don’t count on the built-in helpers (i.e. create_join_table) to create the correct indexes. If you do, there’s a non-zero chance that you have unused indexes in your database.

Paweł Urbanek

A Look at Ruby 2.7's Enumerable#filter_map — If you missed this addition to Ruby 2.7, check it out as it can help tighten up situations where you might otherwise use select and map back to back (though ultimately filter_map is just like map but that only returns truthy values).

Ashik Salman

Why & How to Host your Rails 6 App with AWS Elastic Beanstalk and RDS — From the Honeybadger Developer Blog featuring tutorials and good advice by the coolest error monitoring solution around.😎

Honeybadger sponsor

Considering Rails Multitenancy in 2020 — The Apartment gem is no longer maintained (though this fork works with Rails 6) but there are other ways to move ahead with multitenancy if you need it.

PTSD Engineer

Graceful Request Retries in Ruby Applications — Kirill throws in some tips about background jobs and exceptions, as well.

Kirill Shevchenko

Build an App with Active Record + CockroachDB — CockroachDB, a distributed SQL database, now has a fully-supported Active Record adapter. Direct tutorial link.

Cockroach Labs

▶  Rails App Code Coverage with SimpleCov and RailsBytes — You can add code coverage to your app using SimpleCov – this 11 minute screencast shows how, as well as using RailsBytes to automate it.

Go Rails

Github Actions for Security Checking Rails PRs

Michael Hagar

Rails Architecture Tips From Route Helpers — When you have Rails apps with methods that fall out of the standard CRUD routing approach, Rails can cope but there are ways to improve the experience.

Aaron Sumner

🛠 Code and Tools

Comma: A CSV Generation Extension for Ruby Objects — Define an output format in a basic DSL then easily create CSV from arrays, Active Record objects, etc. Example code here.

Crafter, Meier, Katagiri et al.

RubyMine 2020.2 EAP4: Improved Completion, Support for Git Installed in WSL2, and More — Not everyone wants an IDE and not everyone wants a commercial IDE, but if you do, RubyMine is a pretty good one and the latest updates will be welcomed by both Ruby 2.7 and WSL2 users.


We Help Customers Speed Up Postgres Queries By 1000x. Learn How

pganalyze sponsor

EBNF: An EBNF Parser and Generic Parser Generator — Supports LL(1) parsing as well as the packrat parser approach.

D.R.Y. Ruby

rails-k8s-demo: Dockerized Rails + Sidekiq + ActionCable PostgreSQL/Redis/Puma App“An attempt at creating a standardized Docker/Kubernetes-Helm/GitHub Actions setup for use with Rails projects.”

Le Wagon

Jekyll 4.1.1 Released — Fixing some adverse outcomes in 4.1.0.

Ashwin Maroli