Static Typing in Ruby 3 Gives Me a Headache (But I Could Grow to Like It)

This page summarizes the projects mentioned and recommended in the original post on dev.to

Judoscale - Save 47% on cloud hosting with autoscaling that just works
Judoscale integrates with Rails, Sidekiq, Solid Queue, and more to make autoscaling easy and reliable. Save big, and say goodbye to request timeouts and backed-up job queues.
judoscale.com
featured
InfluxDB high-performance time series database
Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
influxdata.com
featured
  1. sord

    Convert YARD docs to Sorbet RBI and Ruby 3/Steep RBS files

    Sord was originally developed to generate Sorbet type signature files from YARD comments. Sorbet is a type checking system developed by Stripe, and it does not use anything specific to Ruby 3 but is instead a custom DSL for defining types. However, Sord has recently been upgraded to support generation of RBS files (Ru*by **Signature*). This means that instead of having to write all your Ruby 3 type signature files by hand (which are standalone—Ruby 3 doesn't support inline typing in Ruby code itself), you can write YARD comments—just like with Solargraph—and autogenerate the signature files.

  2. Judoscale

    Save 47% on cloud hosting with autoscaling that just works. Judoscale integrates with Rails, Sidekiq, Solid Queue, and more to make autoscaling easy and reliable. Save big, and say goodbye to request timeouts and backed-up job queues.

    Judoscale logo
  3. steep

    Static type checker for Ruby

    Once you have those in place, you use a tool called Steep, which is the official type checker "blessed" by the Ruby core team. Steep evaluates your code against your signature files and provides a printout of all the errors and warnings (similar to any other type checker, TypeScript and beyond).

  4. YARD

    YARD is a Ruby Documentation tool. The Y stands for "Yay!"

    Right now, I'm in the middle of an extensive overhaul of the Bridgetown project to add YARD documentation comments to all classes and methods. With the Solargraph gem + VSCode plugin installed, I get extensive type descriptions and code completion with a minimal amount of effort. If I were to type:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • How do you document your code?

    3 projects | /r/rails | 17 Jan 2023
  • Xeme: I'd value your opinion on my new Ruby gem

    5 projects | /r/ruby | 29 May 2023
  • Programming types and mindsets

    4 projects | /r/ruby | 8 May 2023
  • kwargs and YARD: @param or @option?

    1 project | /r/ruby | 11 Apr 2023
  • Comparing RDoc, YARD, and SDoc: Choosing the Right Documentation Generator for Your Ruby on Rails 5 Project

    1 project | dev.to | 20 Jan 2023

Did you know that Ruby is
the 12th most popular programming language
based on number of references?