---
title: "A Ruby 3.3 preview and Rails 7.1 beta"
publication: "Ruby Weekly"
issue: 669
published_at: "2023-09-14"
canonical_url: "https://rubyweekly.com/issues/669"
---

Plus a compelling, efficient regular expression option from Google. |        

#​669 — September 14, 2023 

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

Together with [![Crunchydata\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_430,h_100/e_make_transparent/co_white,e_outline:7/xyflkz7n00elwtgja9ne.png)](https://www.crunchydata.com/products/crunchy-bridge?utm_source=cprb-pm-0914)   

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/o8nki9k6opte1szo0kyd.jpg)](https://www.ruby-lang.org/en/news/2023/09/14/ruby-3-3-0-preview2-released/)  

[Ruby 3.3 Preview 2 Released](https://www.ruby-lang.org/en/news/2023/09/14/ruby-3-3-0-preview2-released/) — With Christmas Day as the traditional day that new versions of Ruby land, things begin to pick up in the fall. Major performance improvements over 3.2 are already on offer thanks to ongoing improvements with [YJIT](https://shopify.engineering/ruby-yjit-is-production-ready), but there’s also an optional experimental pure-Ruby JIT compiler called RJIT to try. 

Yui Naruse   

['We Turned Lobste.rs into a Benchmark for YJIT'](https://railsatscale.com/2023-08-25-we-turned-lobsters-into-a-rails-benchmark-for-yjit/) — Related to my comments (above) on how YJIT is continuing to get faster and faster, Noah Gibbs has some real world data on just how well YJIT, the default JIT in CRuby, optimizes Rails apps. The ‘real world’ scenario is formed by testing against the Ruby-based code that runs [Lobste.rs](https://lobste.rs/), a Hacker News-esque social link aggregation site. 

Noah Gibbs   [![\](https://copm.s3.amazonaws.com/be9b7d93.png)](https://www.crunchydata.com/products/crunchy-bridge?utm_source=cprb-pm-0914) 

[Fully Managed Postgres + Great Support](https://www.crunchydata.com/products/crunchy-bridge?utm_source=cprb-pm-0914) — "What a different support experience Crunchy is. Not only is it timely, it's informed, it's on topic. We’re encouraged to ask questions. We’re able to do so much more working with a partner who cares as much about data as we do." Rob Sullivan, CareRev. 

Crunchy Bridge sponsor   

[Rails 7.1 Beta 1 Released](https://rubyonrails.org/2023/9/13/Rails-7-1-0-beta-1-has-been-released) — It looks like things are gearing up for lots of Rails 7.1 news (and perhaps even a release) at the forthcoming [Rails World 2023](https://rubyonrails.org/world). This beta puts you on the cutting edge with support for the [Bun](https://bun.sh/) JavaScript runtime, a new `perform_all_later` Active Job method for scheduling jobs en masse, support for composite primary keys in AR, improved async query support, and `Dockerfile` generation for all new apps. 

Rafael Franca   

[Rails Middleware: (Almost) Everything You Need to Know](https://www.akshaykhot.com/rails-middleware-what-why-and-how/) — Akshay continues his run of posts digging into various facets of Ruby and Rails with a look at the use of middleware, a concept introduced by Rack but for which Rails has added a lot of sugar and helpers. 

Akshay Khot   

Akshay is blogging faster than we can link to him, as he's also written [The Complete Guide to Working with Cookies in Rails](https://www.akshaykhot.com/how-http-cookies-work-rails/) which also goes into a lot of depth.  

🎙️ Off the back of some.. _kerfuffle_ about DHH's recent decision to yank TypeScript out of Turbo, [DHH has appeared on the Rework Podcast](https://37signals.com/podcast/typescript-drama-and-open-source-opinions/) to talk about the incident and share his characteristically punchy take on his role. 

🙈 Over on Twitter/X, DHH stood up for Rails by [🐦 pointing to all the companies that have grown large using it.](https://twitter.com/dhh/status/1701299614148919301) This provoked a flurry of discussion, mixed between replies suggesting some of those companies have since migrated _away_ from Rails and people supporting Rails' success. It's certainly been _interesting.._ 

🎙️ Shami Tomita and Eric Halverson went on the _Ruby on Rails Podcast_ to [▶️ discuss the building of the Rails World web site.](https://www.therubyonrailspodcast.com/487) 

📅 In other event news, don't forget [RubyConf 2023](https://rubyconf.org/) is this November in San Diego, CA – tickets are still available. 

🤖 Meanwhile, next month I'm headed to the [AI Engineer Summit](https://www.ai.engineer/summit) in San Francisco. Say hi if you're going! You can still apply to attend or grab a free remote ticket if you want to see what's up.  

📕 Articles and Tutorials 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/wbribpldqshrraiyh92x.jpg)](https://gorails.com/episodes/rails-7-1-authentication-from-scratch)  

▶[Building Authentication from Scratch in Rails 7.1](https://gorails.com/episodes/rails-7-1-authentication-from-scratch) — With a particular focus on features that Rails 7.1 introduces, like [`authenticate_by`](https://blog.kiprosh.com/rails-7-1-adds-authenticated_by/) and `generate_token_for`. 

Chris Oliver   

[When Counting Lines in Ruby Randomly Failed Deployments](https://serpapi.com/blog/lines-count-failed-deployments/) — Sometimes the obvious or idiomatic way to do something can be quite inefficient under the hood, as in this case of using `str.lines.count` to count lines in a string. Luckily, there was a much faster approach.. 

Illia Zub (SerpApi)   

[Need to Upgrade Rails on a Tight Budget? Try Bonsai 🌳](https://www.fastruby.io/monthly-rails-maintenance?utm_source=cooperpress&utm_medium=organic&utm_campaign=monthlymaintanence&utm_term=&utm_content=textonly) — Let the team behind the Rails Upgrade Workshop (RailsConf) gradually upgrade your app and pay off tech debt. 

Fixed-cost Upgrade Services sponsor   

▶[Go Passwordless with WebAuthn in Ruby](https://www.youtube.com/watch?v=yM0vGK4axjA) — A ~40 minute talk on WebAuthn, an authentication method that uses public-key cryptography together with biometrics. Braulio explains how it works and how to add it to a Ruby app. 

Braulio Martinez   

[Express Yourself Clearly with `positive?` and `negative?`](https://andycroll.com/ruby/express-yourself-clearly-with-positive-negative-numbers/) — Two handy numeric methods that were added in Ruby 2.3 but which may have escaped your attention till now. They can help you clean up things like `if num > 0` or `if num < 0` though Andy touches on a couple of downsides too. 

Andy Croll   

[How to Improve Rails Caching with Brotli Compression](https://pawelurbanek.com/rails-brotli-cache) — Improving cache performance can be a game changer for larger apps, so better compression and a strategy that intelligently includes an in-memory cache is worth checking out (or you can just slip [Rails Brotli Cache](https://github.com/pawurb/rails-brotli-cache) into your app). 

Paweł Urbanek   

[We Used to Store Files as Base64 Strings in Postgres.. Not Anymore](https://blog.mailpace.com/blog/we-used-to-store-files-as-strings-in-the-database-but-no-more/) — Just because you can, doesn’t necessarily mean you _should._ 

Paul Oms (MailPace)   

[Using the Cursor IDE to Make Changes in a Rails App](https://allaboutcoding.ghinda.com/using-cursor-ide-for-some-small-changes-in-a-rails-app) — A quick look at the curious [Cursor](https://www.cursor.so/) ‘AI-first code editor.’ 

Lucian Ghinda   

[Refactoring from Feature Specs to System Specs](https://railsnotes.xyz/blog/feature-specs-to-system-specs) 
Harrison Broadbent   

[Add a Favicon to Your Rails App in Two Minutes](https://railsnotes.xyz/blog/rails-add-favicon-2-minutes) 
Harrison Broadbent   

[Exploring Ruby Warnings](https://www.fastruby.io/blog/exploring-ruby-warnings.html) 
Ariel Juodziukynas  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/be2tdgu4qshjlfkwpdau.jpg)](https://github.com/mudge/re2/releases/tag/v2.0.0)  

[re2 v2.0: Ruby Bindings to the RE2 Regular Expression Library](https://github.com/mudge/re2/releases/tag/v2.0.0) — [RE2](https://github.com/google/re2) is a fast, thread-safe regular expression engine built by Google (and used in products like Gmail) that, notably, **avoids recursive backtracking** by using finite automata-based techniques (Russ Cox has [an article about this](https://swtch.com/~rsc/regexp/regexp1.html)). Note that [the regex syntax](https://github.com/google/re2/wiki/Syntax) is slightly different to PCRE. As of v2.0, the Ruby gem includes vendored versions of RE2 so it can be installed more easily. [Docs.](https://mudge.name/re2/) 

Paul Mucur   

[nats-pure: Pure Ruby Client the NATS Cloud Native Messaging System](https://github.com/nats-io/nats-pure.rb) — [NATS](https://nats.io/) is worth exploring if you’re unfamiliar with it. It provides a lot of supporting functionality for building distributed apps of any kind. (Trivia: It was _originally_ built in Ruby itself, but was later ported to Go.) 

NATS Project   

[Wasting Time and Budget Interviewing the Wrong Candidates?](https://link.testdouble.com/custom-recruitment) — Get better outcomes from recruiters who speak engineering. Find the right hire faster. 

Test Double sponsor   

[JRuby 9.3.11.0 Released](https://www.jruby.org/2023/09/11/jruby-9-3-11-0) — The Ruby 2.6.x compatible branch of the JVM Ruby implementation get some bugfixes, as well as an update to `strscan`. 

JRuby Core Team   

[Linguist: GitHub's Language Detection System](https://github.com/github-linguist/linguist) — The library that GitHub itself uses to detect the languages used in git repos. It can also be used as a CLI tool. 

GitHub   

- [sqlite3-ruby 1.6.6](https://github.com/sparklemotion/sqlite3-ruby/releases/tag/v1.6.6)
 ↳ Vendored SQLite is updated to [v3.43.1](https://sqlite.org/releaselog/3_43_1.html)
- [algoliasearch-rails 2.3](https://github.com/algolia/algoliasearch-rails)
 ↳ AlgoliaSearch integration with ActiveRecord, Mongoid or Sequel.
- [Stripe Ruby 9.2](https://github.com/stripe/stripe-ruby)
 ↳ Ruby library for the Stripe API.
- [elasticsearch-ruby 8.10](https://github.com/elastic/elasticsearch-ruby/releases/tag/v8.10.0)
 ↳ Ruby integrations for Elasticsearch.    

Jobs  

[Find Ruby Jobs with Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-rubyweekly%29&utm_content=easy-job-hunting) — Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now. 
Hired            

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 [Supporting Ukraine](https://linktr.ee/RazomForUkraine) 

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/).
