Posts tagged with "ruby"

All posts related to ruby

Prosopite - Rails n+1 query auto-detection

Prosopite, recently featured in Ruby Weekly #740, emerges as a promising alternative to the well-known Bullet gem. This newer tool offers a more streamlined approach to detecting n+1 queries in Rails applications while boasting improved accuracy with fewer false-positives.

N+1 queries often significantly impact application performance. Having reliable detection tools in our arsenal is essential for maintaining efficient database interactions.

I’ve recently dealt with removing N+1 queries on an application, leading to 2x latency improvements. That system also suffered from another kind of N+1 problem - it looked up a ton of cache keys in Redis, which I’ve changed to a single lookup, avoiding unnecessary roundtrips to the cache.

Read more

Honyaku - OpenAI powered rails translations

Honyaku recently featured in Ruby Weekly #740 is a tool built with LLM-powered tools (Cursor and Claude Sonnet 3.5) to automatically translate Rails locale files.

While automated translation isn’t revolutionary on its own, Honyaku’s business impact is striking:

Created because it replaced a $34K/year SaaS contract and streamlined our deploy process.

This case perfectly illustrates the power of focused software development: building a targeted solution to a specific problem can drastically cut costs.

It’s fascinating how this practical approach often delivers better, more efficient results than using off-the-shelf, expensive services.

From my experience, this problem-first mindset typically leads to solutions that are both simpler and more economical.

Read more

rails-diff - compare rails generated files

rails-diff via Ruby Weekly #740 is a tool which allows comparing the files generated by Rails during the installation or upgrade process with their current version in the local repository.

When dealing with Rails upgrades, or with generator *:install commands, I often find that figuring out the diffs and what needs to get updated or removed is the least enjoyable part of the process.

I have yet to try this tool, but lately I’ve been thinking of a few ways to improve this process:

  1. Make the diff easier to deal with by adding your own edits at the end of the generated files, unless changing a generated option value.
  2. Move your own changes to dedicated files which, by limiting the changes to the generated files to a minimum, would make dealing with diffs easier.

Either way, I’ll try these approaches on our applications at work and hopefully make upgrading Rails an enjoyable experience.

Read more