I want to try Rails but I can't downgrade away from static typing for my personal projects. I typically want to spin them out quickly and not worry about writing tests: static typing adds way too much value in that scenario.
I looked into Ruby's static typing attempts but the picture painted was grim.
Sadly, that is the reality of Ruby, no excuses. Introducing static typing to Ruby is a huge task considering the way the language is designed.
The attempts you've seen is probably Sorbet (sorbet-runtime) and RBS. In my opinion, RBS would be an option for me if they didn't force me to work in a separate file just for type declarations.
FYI rbs-inline is maintained by the rbs creator, and will eventually be merged into mainline, once the inline syntax alternatives are set in stone. All to address the main complaint you mentioned above.
It's not really sad. Optional static typing has advantages and disadvantages and there are enough dynamic programming languages that have it (JS, Python for example).
I think the problem with static typing is that it changes the whole ecosystem too much to be considered just optional, even if it's backwards compatible (like in Python).
Just as an example I'm using lambdas in fasthtml in Python that don't allow type specifications for adding routes and fasthtml keeps on spitting out warnings that I didn't specify the type and doesn't handle variables in lambda functions correctly.
> Just as an example I'm using lambdas in fasthtml in Python that don't allow type specifications for adding routes and fasthtml keeps on spitting out warnings that I didn't specify the type and doesn't handle variables in lambda functions correctly.
That's a very interesting yet valid downside I didn't think of
IMHO if you like static types, I suspect you won't like Rails. Its the intentional opposite of them in many ways. I made the swap you're contemplating with similar reservations and absolutely regret it. Rails is definitely great but IME it appeals to a particular kind of developer, in the same way hard-core functional languages, strict types, or e.g. Go's' flavor of error handling each appeal to other groups. I've found those higher level patterns extend beyond mere fashion and more into some kind of persistent style preferences that's not easily changed. I dipped into the functional world and did not like it. Now I feel similarly about Rails. There are just so many times I want to offload my mental model into types, and that concept doesn't really exist in Rails. And it doesn't seem to bother most of the folks I work with, and I suspect it has more to do with how my brain works under the hood compared to theirs.
I definitely think Rails can be worth trying, but if you're the type to be evaluating types from the outset, I'd wager that's the exact kind of person that won't like what they get into.
I looked into Ruby's static typing attempts but the picture painted was grim.