---
title: "Sinatra 4.0"
publication: "Ruby Weekly"
issue: 687
published_at: "2024-01-25"
canonical_url: "https://rubyweekly.com/issues/687"
---

Plus the growing popularity of SQLite, and 37signals' newest Rails app. |        

#​687 — January 25, 2024 

[Read on the Web](https://rubyweekly.com/issues/687)  

Together with [![FastRuby.io\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_467,h_106/e_make_transparent/co_white,e_outline:14/y65nyff19ylf5udphsq4.png)](https://go.fastruby.io/xfq)   

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/hjbn193qw5wjc6x25fff.jpg)](https://sinatrarb.com/)  

[Sinatra 4.0: The Long Standing Ruby Webapp DSL](https://sinatrarb.com/) — No official blog post yet, but [the changelog](https://github.com/sinatra/sinatra/blob/main/CHANGELOG.md#400--2024-01-19) has the full details. v4 gains support for [Rack 3](https://github.com/rack/rack/blob/main/UPGRADE-GUIDE.md) (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](https://fractaledmind.github.io/2023/12/23/rubyconftw/) — Deploying apps that use SQLite has been generating some buzz recently (we’ve raved about [Litestack](https://github.com/oldmoe/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.'](https://henrycatalinismith.github.io/2024/01/14/my-sqlite-in-production-epiphany)  [![\](https://copm.s3.amazonaws.com/f3ed2ba2.png)](https://go.fastruby.io/xfq) 

[Need to Upgrade Rails? Let’s Talk 🚀](https://go.fastruby.io/xfq) — Need an expert? Top-notch engineering teams (from startups to Fortune 500 companies) trust [the FastRuby.io team](https://www.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](https://www.driftingruby.com/episodes/exploring-campfire) — Famous for building Rails-powered SaaS apps, 37signals is taking some steps into offering [single payment, self hosted apps](https://once.com/): 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](https://www.youtube.com/watch?v=yESRTbpKGg8) about deploying it. 

David Kimura   

- 🙋 Ruby Central is [looking for social media volunteers](https://rubycentral.org/news/socialmediavolunteers/) to help support the social media around RailsConf 2024 and related events.
- 🤔 Some [reflections on attending RubyConf 2023](https://railsatscale.com/2024-01-18-shopify-at-rubyconf-2023/) from Shopify.
- 🍒 Victor Shepelev concludes his popular _'useless Ruby sugar'_ series with [some thoughts on Ruby's ongoing evolution](https://zverok.space/blog/2024-01-23-syntax-sugar-fin.html) and his feelings about the series itself.
- 🇮🇹 [RubyDay 2024](https://2024.rubyday.it/) is the _eleventh_ outing for the Italian Ruby conference (though everything is in English). It's in Verona on May 31 and you can [apply to speak](https://sessionize.com/rubyday-2024/) (the deadline is next week).
- 📰 JetBrains has opened the [Early Access Program for RubyMine 2024.1](https://blog.jetbrains.com/ruby/2024/01/rubymine-2024-1-early-access-program-is-open/), its commercial Ruby IDE.  

📕 Articles & Tutorials 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/kvsro4ykmbon44v0qqss.jpg)](https://mkaz.me/blog/2024/self-hosted-overvability-stack-for-ruby-on-rails-apps/)  

[A Self-Hosted Observability Stack for Rails Apps?](https://mkaz.me/blog/2024/self-hosted-overvability-stack-for-ruby-on-rails-apps/) — An introduction to [opentelemetry-rails-example](https://github.com/michal-kazmierczak/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](https://glaucocustodio.github.io/2024/01/23/migrating-from-dokku-to-kamal-scheduling-cron-jobs/) — Part of [a series](https://glaucocustodio.github.io/2024/01/18/migrating-from-dokku-to-kamal-provisioning-with-terraform/) on moving from Dokku to Kamal for deploying Rails apps generally. 

Glauco Custódio   

[Your 2024 Roadmap: Budgets Shrink, but Scope Doesn’t 😱](https://link.testdouble.com/rw-budgets-shrink) — 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](https://www.shakacode.com/blog/headless-chrome-automation-in-rails-using-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](https://andyatkinson.com/blog/2023/11/16/kelvin-andrew-postgresql-rails-performance) — Not convinced by SQLite? The author of [High Performance PostgreSQL for Rails](https://pragprog.com/titles/aapsql/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](https://thoughtbot.com/blog/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](https://www.writesoftwarewell.com/understanding-rails-environments/) — 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](https://www.honeybadger.io/blog/composite-keys-in-rails/) 
Kingsley Silas   

[How to Encode a URL String in Ruby](https://bootrails.com/blog/how-to-encode-url-string-in-ruby/) 
David Boureau  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/q70de9ww1qridi52px8c.jpg)](https://github.com/comma-csv/comma)  

[Comma 4.8: Structured CSV Generation for Ruby Objects](https://github.com/comma-csv/comma) — Define an output format with a DSL then create CSV from arrays, Active Record objects, etc. [Example code](https://github.com/comma-csv/comma/wiki). v4.8 adds Ruby 3.2/3.3 and Rails 7.1 support. 

Marcus Crafter   

[nokogiri-diff: Get the Differences Between XML/HTML Docs](https://github.com/postmodern/nokogiri-diff) — A handy extension for the [Nokogiri](https://nokogiri.org/index.html) HTML/XML parsing library that provides a `diff` method to go through the differences between two documents ([example](https://github.com/postmodern/nokogiri-diff?tab=readme-ov-file#examples)). 

Postmodern   

[Most Highly Coupled Rails Insights Tool On The Market Today](https://scoutapm.com/ruby-monitoring?utm_source=rubyweekly&utm_medium=affiliate&utm_campaign=1_25_24&utm_content=newsletter_ad) — 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](https://github.com/nicholaides/cecil) — 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 API](https://github.com/atipugin/telegram-bot-ruby) — [Telegram](https://telegram.org/) is a popular messaging app that’s particularly friendly to bot developers. v2.0 of this wrapper adds [Bot API 7.0](https://core.telegram.org/bots/api#december-29-2023) support. 

Alexander Tipugin et al.   

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/guwebjjkyam9vbmskch7.jpg)](https://marketplace.visualstudio.com/items?itemName=dewski.simplecov#simplecov)  

[View SimpleCov Test Coverage Inline in VS Code](https://marketplace.visualstudio.com/items?itemName=dewski.simplecov#simplecov) — After generating a test coverage report with [SimpleCov](https://github.com/simplecov-ruby/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](https://github.com/amancevice/yake) — 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](https://github.com/gangelo/dsu/wiki) — That’s Agile-style [daily stand up meetings](https://business.adobe.com/blog/basics/daily-stand-up), not stand-up comedy.. ;-) Gene [explains how he uses it](https://genemangelojr.blogspot.com/2024/01/the-dsu-ruby-gem-workflow-how-to-use-it.html) in his job. 

Gene M. Angelo, Jr.   

- [hexdump.rb 1.0.1](https://github.com/postmodern/hexdump.rb) – Full-featured, fast hex dumping from Ruby.
- [Mechanize 2.10](https://github.com/sparklemotion/mechanize) – Library to automate web interactions.
- [sqlite3-ruby 1.7.1](https://github.com/sparklemotion/sqlite3-ruby) – Say hello to [SQLite v3.45.0](https://www.sqlite.org/releaselog/3_45_0.html).
- [re2 2.7](https://github.com/mudge/re2) – Ruby bindings to RE2's safer regexes.
- [Sidekiq::Throttled 1.3](https://github.com/ixti/sidekiq-throttled) – Throttling for Sidekiq.
- [Logster 2.16](https://github.com/discourse/logster) – Log/exception viewer UI for Rack apps.
- [Gemsmith 21.1](https://github.com/bkuhlmann/gemsmith) – CLI for smithing Ruby gems.
- [DeliveryBoy 1.2](https://github.com/zendesk/delivery_boy) – Publish messages to Kafka.
- [Spidr 0.7.1](https://github.com/postmodern/spidr) – Versatile web spidering library.
- [Passenger 6.0.20](https://blog.phusion.nl/2024/01/22/passenger-6-0-20/)         

Curated by [Peter Cooper](https://twitter.com/cooperx86) and [Glenn Goodrich](https://twitter.com/ruprict).
Published by [Cooperpress](https://cooperpress.com/). 

[Change your email](https://rubyweekly.com/edit_subscription/*|UID|*) or [Stop getting this newsletter.](https://rubyweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

Other weekly newsletters we publish include [Postgres Weekly](https://postgresweekly.com/), [React Status](https://react.statuscode.com/), [Frontend Focus](https://frontendfoc.us/), and [JavaScript Weekly](https://javascriptweekly.com/).
