#545 — March 25, 2021

Read on the Web

Ruby Weekly

Rails Installation Broke Briefly as Dependency Yanked Old Versions of Gems — A bit of a complicated story this! In brief, MimeMagic is a library for detecting the MIME type of files, but it contained a GPL licensed file for years despite the project being MIT licensed. To rectify the problem, the creator switched MimeMagic to GPL and yanked (removed) the old versions upon which Rails had a dependency - oops! The author then released a new version to fix the problem, but the licensing remains a standing issue given the effects the GPL can have on consuming projects.

Rails GitHub Issues

Crystal 1.0 Released: A Ruby-esque Compiled Language — Crystal is a language heavily inspired by Ruby but that offers compilation, static type checking, macros, and ultimately a lot of performance. Crystal isn’t Ruby but it’s close enough that I know of many Rubyists who’ve added it to their repertoire.

The Crystal Core Team

Deploy Rails Apps with Cloud 66 — Deploy and manage your Ruby on Rails applications to any cloud or server. From code to production in minutes. Build great web applications faster, and let us take care of your infrastructure. 4-week free trial + extra $100 free credits with the code: Ruby-Weekly!.

Cloud 66 sponsor

How GitHub Found and Fixed a Rare Race Condition in Its Session Handling — If you were unceremoniously logged out of Github on March 8th, it was for your own safety as a race condition and some new code was swapping sessions between users. This post-incident report is a worthy read given their reliance on Unicorn, Rack, and Rails.

Github

How to Use to_sql to See What Query ActiveRecord Will Generate — It’s not always easy to remember all of the pieces you need to construct specific queries with ActiveRecord, so this sort of live debugging and looking behind the scenes could come in useful.

Matt Swanson

Quick Bits

💻 Jobs

Senior Software Engineer — Remote Senior Software Engineer for a software consultancy company based in NYC.

Def Method

Join Mon Ami and Use your Ruby/JS Skills for Good — We replace antiquated software used by cities to provide Covid relief and other services to vulnerable seniors. Remote or SF.

MonAmi

Find Your Next Job Through Hired — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers.

Hired

📘 Articles & Tutorials

Understanding and Using Ruby's Powerful #grep MethodEnumerable#grep has been around since almost forever but I think it’s often forgotten and I don’t see it in a lot of production code. Here’s what it does and why it’s useful.

Shadi Rezek

▶  Docker Basics for Rails Developers — A look at setting up a Dockerfile for a Rails app and Docker Compose yml for other services you might need like Postgres or Redis.

Chris Oliver

Founders/CTO’s: Application Dependencies Outdated? We Can Help — Work with our expert team to get your apps up to date.

Hint sponsor

Live Previews with Rails and Stimulus 2 — It’s super easy (when you see how, at least.)

Josef Strzibny

RSpec Fundamentals: A Basic Glossary — An introduction to some key terms you’ll often encounter when working with RSpec.

Remi Mercier

Dead Simple Rails Monitoring — In less than 100 lines of code Tom created a simple but useful (and free!) monitoring solution using the ActiveSupport Instrumentation API.

Tom Rothe

Writing a Buildpack for the Rails Asset Pipeline — “Buildpack” here is “Cloud Native Buildpack” (CNB) that you can use to run your code on any cloud provider.

Genevieve L'Esperance

Don’t Give Up On Your Rails Generators — Generators aren’t just for installs or scaffolding; they promote consistency and automate tasks for your development team.

wasabigeek

Implementing Order with ActionCable Signalling and WebRTC

Emmanuel Hayford

Be Specific When Defining Your Rails Routes — Andy thinks you need to get a bit more specific about the routes you really need.

Andy Croll

What is a Rails Model?“Here’s how I think about what Rails models are.”

Jason Swett

🛠 Code and Tools

FastStatistics: Fast Computation of Descriptive Statistics using Native Code and SIMD — Calculate things min, max, mean, median, quartiles and standard deviations on datasets from Ruby but with the power of native code and SIMD intrinsics backing you up.

Martin Nyaga

Gem in a Box 1.3: Really Simple RubyGem Hosting — A way to self-host your own gems and push new gem up just like you would with rubygems.org.

Gem in a Box

Rails Multisite: Multi Tenancy for Rails Applications — Want each hostname used with an app to have its own database? It’s possible. This new release adds Rails 6.1+ compatibility.

Sam Saffron

Collaborative, Effortless Project Management

Clubhouse.io sponsor

Kiba 4.0: Data Processing and ETL Framework for Ruby — The ‘go to’ framework for doing ETL jobs (when you take data from one place to another with some transformation in the middle) in Ruby. Despite the big 4.0 major version release, most users shouldn’t notice any difference (unless you’re using Ruby 2.4 or the legacy runner).

Thibaut Barrère

Active Record Replica: Redirect ActiveRecord Reads to Replica Databases While Ensuring Writes Go to the Primary

Spring

CreditCardValidations: Gem for Validating Card Numbers, Generating Numbers, and Luhn Checks

Igor Fedoronchuk

Navigable: A Small Ruby Gem with Big Ideas About Business Logic — Navigable creates commands and observers to decouple business logic in the hopes of making extension and changes easier.

First Try! Software