---
title: "Thoughts about static typing in Ruby"
publication: "Ruby Weekly"
issue: 716
published_at: "2024-08-22"
canonical_url: "https://rubyweekly.com/issues/716"
---

Plus Ruby takes another big step into the machine learning world. |        

#​716 — August 22, 2024 

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

Together with [![Crunchy Bridge\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_1292,h_286/e_make_transparent/co_white,e_outline:27/somgpnjh8wivqxfry9ga.png)](https://www.crunchydata.com/case-studies/honeybadger?utm_source=cp-rb-082224)   

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/nfmu8bnbjxmducjdak64.jpg)](https://github.com/ankane/transformers-ruby)  

[Transformers.rb: State-of-the-Art Transformers for Ruby](https://github.com/ankane/transformers-ruby) — Put down that Python – great things are continuing to happen for ML aficionados in Ruby. Andrew, now widely known for his work on [pgvector](https://github.com/pgvector/pgvector), has shipped a way to use [Torch.rb](https://github.com/ankane/torch.rb) to use transformer models from [Hugging Face](https://huggingface.co/) directly from Ruby. 

Andrew Kane   

[The Rails Router Handbook](https://books.writesoftwarewell.com/3/rails-router) — A free online book all about the Rails router that covers all the hits, including resources, nested routes, segment constraints, routing concerns, and more. 

Akshay Khot   

💡 Notably, the book above uses 37signals' free Rails app [Writebook.](https://once.com/writebook)  [![\](https://copm.s3.amazonaws.com/522de846.png)](https://www.crunchydata.com/case-studies/honeybadger?utm_source=cp-rb-082224) 

[Streamline Postgres with Crunchy Bridge](https://www.crunchydata.com/case-studies/honeybadger?utm_source=cp-rb-082224) — Honeybadger moved from self-hosted Postgres to Crunchy Bridge, gaining expert support, saving time on routine maintenance, and simplifying compliance. Discover how Crunchy Bridge can take the burden off your team and let you focus on growth. 

Crunchy Bridge sponsor   

[What About Static Typing in Ruby?](https://noelrappin.com/blog/2024/08/what-about-static-typing-in-ruby/) — Noel works through his thoughts and feelings about static typing and its limitations and costs. There’s no strong conclusion, other than this stuff _is_ complicated to weigh up but worthy of thought nonetheless. 

Noel Rappin   

[A List of Forthcoming Ruby Conferences](http://rubyconferences.org/) — If you want to see what Ruby events are coming up, this great resource continues to be maintained, and even has iCal feeds for both event and CFP dates. 

Jon Allured   

**IN BRIEF:** 

- Ruby's [REXML](https://github.com/ruby/rexml) XML library seems to be one of those libraries you really need to upgrade on a frequent basis lately, with several DoS vulnerabilities found and fixed in the past couple of months. Today, [there's a fresh one.](https://www.ruby-lang.org/en/news/2024/08/22/dos-rexml-cve-2024-43398/)
- 📅 If you're determined to make it to 2025's last-ever [RailsConf](https://railsconf.org/), Ruby Central has [opened up sales of 'supporter' level tickets](https://ti.to/railsconf/2025). Regular tickets will become available later on.
- Ruby Central's [latest August 2024 newsletter](https://rubycentral.org/news/august-2024-newsletter/) brings us up to speed with news on their events, as well as work on the RubyGems system.   

[Should `private` Work on Constants Too?](https://allaboutcoding.ghinda.com/proposal-for-making-private-keyword-work-on-constants-too) — Lucian goes back to [a proposal rejected by Matz](https://bugs.ruby-lang.org/issues/17171) and argues for why it’s worth another look. 

Lucian Ghinda   

[Building a Better `bin/dev` Script for Rails](https://mattbrictson.com/blog/better-bin-dev-script) — `run-pty` offers a few advantages over Foreman, such as the ability to switch between pseudo-terminals for each running process. 

Matt Brictson   

[Rails + AI: Turn Ideas into Apps. Book a Meeting](https://reinteractive.com/ai-proof-of-concept) — Struggling with AI integration in Rails? We use (OpenAI, Claude, AWS Bedrock etc) to build amazing Rails apps. Let's discuss. 

reinteractive::Custom AI integrations with RoR sponsor   

🎵 [Sonic Pi: Ruby as a Composition Tool?](https://bhmt.dev/blog/sonic_pi/) — If you’ve ever argued coding is more art than science, here’s a chance to drive that home by creating music with [Sonic Pi’s](https://sonic-pi.net/) Ruby-adjacent DSL. Sean (a music major turned Rubyist) walks through some examples. 

Sean Morrissey   

📄 [A Decoupled Approach to Relaying Events Between Stimulus Controllers](https://justin.searls.co/posts/a-decoupled-approach-to-relaying-events-between-stimulus-controllers/) Justin Searls 

📄 [Conditionally Render a Turbo Frame Shared Between Multiple Views](https://thoughtbot.com/blog/conditionally-render-turbo-frame) Steve Polito 

📄 [Configuring SSH Keys for Multiple GitHub Accounts](https://stevenharman.net/configure-ssh-keys-for-multiple-github-accounts) Steven Harman 

📄 [A Look at a Sidekiq to Solid Queue Migration](https://blog.saeloun.com/2024/08/21/sidekiq-to-solid-queue-migration/) Apoorv Tiwari  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/s1rgxgn4bvpnorfsndmb.jpg)](https://github.com/asg017/sqlite-vec)  

[sqlite-vec: A Vector Search Extension for SQLite](https://github.com/asg017/sqlite-vec) — If using a dedicated vector storage database is beyond your immediate requirements, you can now use SQLite for the task. While this is an SQLite extension, it’s easy to use with numerous languages, [including Ruby.](https://alexgarcia.xyz/sqlite-vec/ruby.html) 

Alex Garcia   

[Chartkick 5.1: Attractive JavaScript Charts in One Line of Ruby](https://chartkick.com/) — A long standing library that saves you from fighting with charting libraries. [GitHub repo.](https://github.com/ankane/chartkick) 

Andrew Kane   

[Free eBook: Indexing Postgres - Create The Best Index For Your Queries](https://pganalyze.com/ebooks/postgres-indexing?utm_source=RubyWeeklySecondary08222024) — Learn how to make effective index choices for your Rails application. A deep dive into index types, operators, and more. 

pganalyze sponsor   

[ActualDbSchema: Keep a Rails DB Schema Consistent When Switching Branches](https://github.com/widefix/actual_db_schema) — Migrations can get messy if you’re switching branches in a Rails app. The job of this project is to [clean up that mess.](https://blog.widefix.com/actual-db-schema/) Now includes a Web UI to look at and manage the migrations. 

Andrei Kaleshka   

[RubyGateway: Embed Ruby in Swift](https://github.com/johnfairh/RubyGateway) — Load gems, run Ruby scripts, and invoke APIs seamlessly in both directions. 

John Fairhurst   

- [Solid Cache 1.0](https://github.com/rails/solid_cache/releases/tag/v1.0.0) – The database-backed Active Support cache store. Now requires Rails 7.2+.
- [Goldiloader 5.3](https://github.com/salsify/goldiloader) – Just the right amount of Rails eager loading. Now supports Rails 7.2.
- [Ruby JSON Schema Validator 5.0](https://github.com/voxpupuli/json-schema) – Validate JSON objects against a JSON schema.
- [Premailer 1.25](https://github.com/premailer/premailer) – Inline CSS into HTML email. _(We use this for Ruby Weekly!)_
- [Good Job 4.2](https://github.com/bensheldon/good_job/releases/tag/v4.2.0) – Postgres-backed job queue for Ruby on Rails.
- [Que 2.4](https://github.com/que-rb/que) – Ruby job queue that uses Postgres advisory locks.
- [Artemis 1.1](https://github.com/yuki24/artemis) – GraphQL client designed to work well with Rails.
- [redis-rb 5.3](https://github.com/redis/redis-rb) – The Ruby client library for [Valkey](https://valkey.io/) / Redis.         

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