Articles tagged with Ruby

The Joy of a Single-Purpose Class: From String Mutation to Message Composition

ruby warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information)

Stop concatenating URLs with strings — Use proper tools instead

At first glance, it looks harmless, but it hides several traps that can lead to hard–to–debug errors.

Installing Precompiled Native Gems with bundle lock --add-platform

There's a great chance that your Ruby app occasionally explodes during bundle install because of native extensions. There's an even greater chance that it happens with nokogiri, ffi or some other notorious gem with C extensions. The problem gets worse when you're working across different operating systems or upgrading Ruby versions. Let's fix this once and for all.

The most underused pattern in Ruby

Recently one of the RailsEventStore users posted an issue that one wanted to use RES on a Postgres database with PostGIS extension. Migration generator used to setup tables for events and streams was failing with UnsupportedAdapter error.

How to become 10x developer with a help of ChatGPT

Is being a 10x developer still a thing? Trends change, currently there's a lot of chatter around whether LLMs will take our jobs, sorry couldn't stand this South Park reference.

How we got struck by 5–year–old implementation

Recently we discovered that we were wrong on computing lock key for acquiring advisory locks. It was already covered as an update to article about building read models, but we thought that telling the whole story behind the issue could be interesting for you.

A lesser known capability of Ruby's JSON.parse

If you ever got annoyed by the fact that JSON.parse returns hash with string keys and prefer hashes with symbols as keys, this post is for you.