#​687 — January 25, 2024

Read on the Web

Together with  FastRuby.io

Ruby Weekly

Sinatra 4.0: The Long Standing Ruby Webapp DSL — No official blog post yet, but the changelog has the full details. v4 gains support for Rack 3 (quite a big deal by itself), drops Rack 2 support, and requires Ruby 2.7.8 or higher.

Sinatra Contributors

How (and Why) to Run SQLite in Production — Deploying apps that use SQLite has been generating some buzz recently (we’ve raved about Litestack a few times now) and Stephen is a fan, so he shows how to deploy a Rails app to Hatchbox along with what to do when you want to scale. Rails has been able to use SQLite for many years, but expect to see more of it at scale in 2024.

Stephen Margheim

Elsewhere, Henry Catalini Smith writes about his 'SQLite in production epiphany.'

Need to Upgrade Rails? Let’s Talk 🚀 — Need an expert? Top-notch engineering teams (from startups to Fortune 500 companies) trust the FastRuby.io team in mission-critical upgrades. Leverage our 30,000+ dev/hs of experience: Get to Ruby 3.3 and Rails 7.1 in weeks with zero downtime 🔥

FastRuby.io Upgrade Services sponsor

▶  Exploring Campfire, 37signals' New 'Once' Rails App — Famous for building Rails-powered SaaS apps, 37signals is taking some steps into offering single payment, self hosted apps: the first one being a revival of their Campfire chat app. This video takes a quick, independent look at the app (including its code) or you can enjoy DHH’s own video about deploying it.

David Kimura

📕 Articles & Tutorials

A Self-Hosted Observability Stack for Rails Apps? — An introduction to opentelemetry-rails-example, a repo that provides a demo of implementing OpenTelemetry in a Rails app.

Michal Kazmierczak

Migrating from Dokku to Kamal: Scheduling Cron Jobs — Part of a series on moving from Dokku to Kamal for deploying Rails apps generally.

Glauco Custódio

Your 2024 Roadmap: Budgets Shrink, but Scope Doesn’t 😱 — Burst capacity to hit today’s deadlines + strategies for future goals. We set you up for success long after we’re gone.

Test Double sponsor

Using Headless Chrome from Ruby: Conquering Automation with Ferrum — A handy introduction to Ferrum, Ruby’s answer to Puppeteer for remotely controlling a headless Chromium instance cleanly.

Alkesh Ghorpade

Teaching High Performance PostgreSQL for Rails — Not convinced by SQLite? The author of High Performance PostgreSQL for Rails caught up with Kelvin Omereshone to teach him about efficiently working with Postgres in Rails apps, and we all get to benefit too.

Andrew Atkinson

Rails Advanced Routing Constraints — Authorizing requests at the routing layer rather than in the controller is cleaner, if your use case can get away with it.

Steve Polito

Understanding How Rails Environments Work — While you likely have an understanding about how environments work, there are some deeper tidbits covered here, along with some classes you may want to incorporate into other code (We’re looking at you, StringInquirer.)

Akshay Khot

Using Composite Primary Keys in Rails
Kingsley Silas

How to Encode a URL String in Ruby
David Boureau

🛠 Code & Tools

Comma 4.8: Structured CSV Generation for Ruby Objects — Define an output format with a DSL then create CSV from arrays, Active Record objects, etc. Example code. v4.8 adds Ruby 3.2/3.3 and Rails 7.1 support.

Marcus Crafter

nokogiri-diff: Get the Differences Between XML/HTML Docs — A handy extension for the Nokogiri HTML/XML parsing library that provides a diff method to go through the differences between two documents (example).

Postmodern

Most Highly Coupled Rails Insights Tool On The Market Today — Scout APM is made for monitoring Ruby apps. Get all the APM insights and support you need from actual Rails engineers.

Scout APM sponsor

Cecil: An Experimental Templating Library for Code — Rather than outputting HTML as many templating engines might, Cecil is focused on generating source code and similar structured data from templates, such as OpenAPI definitions, Mermaid code, state machines, complex types, and test cases.

Mike Nicholaides

telegram-bot-ruby 2.0: A Wrapper for Telegram's Bot APITelegram is a popular messaging app that’s particularly friendly to bot developers. v2.0 of this wrapper adds Bot API 7.0 support.

Alexander Tipugin et al.

View SimpleCov Test Coverage Inline in VS Code — After generating a test coverage report with SimpleCov, this extension will parse the report and display the coverage inline in the editor.

Visual Studio Marketplace

Yake 1.1: A DSL for Writing AWS Lambda Handlers Rake-Style — It includes the ability to write Sinatra style routes and feels like an idiomatically Ruby-ish way to work with AWS’s serverless platform.

Alexander Mancevice

dsu: A Ruby Tool to Manage Daily Standups — That’s Agile-style daily stand up meetings, not stand-up comedy.. ;-) Gene explains how he uses it in his job.

Gene M. Angelo, Jr.