The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
đ El que busca, encuentra â and Ruby proves it.
In my latest article, I explore how Ruby handles search operations across arrays, hashes, and other collections. From expressive methods like .find, .select, and .grep, to efficient algorithms like .bsearch, Ruby empowers developers to write clear and intentional code when looking for what matters. [more inside]
Think before you cache
Explore caching strategies and tools in Rails, from low-level manual caching to popular tools and gems that make caching easier. Weâll learn how to identify effective caching opportunities and avoid common pitfalls. [more inside]
OasRails: From a Rails Engine to a Framework-Agnostic Solution
Ruby is not just Rails, which is why I split my gem for API documentation, and now it could work with multiple frameworks. [more inside]
đ§ Tired of deeply nested routes in Rails?
If youâre working with complex model relationships in Rails, shallow: true might be the clean solution youâre looking for. In my latest article, I explore how this simple option helps reduce route depth, simplify controller logic, and keep your code RESTful and maintainable â without losing model structure. [more inside]
đ§Ÿ New Post: Making Accessible PDFs with Ruby (PAC 2024 Edition)
Generating PDF/UA-compliant PDFs? Not as easy as flipping a flag. In this post, I document the battle with PAC 2024, Chrome quirks, and missing metadataâand how I used (and built) Ruby tools to fix it. [more inside]
5 gems you no longer need with Rails
Sometimes upgrading Rails apps makes app dependencies obsolete â their functionality is present in the framework. Dropping them would make future app maintenance easier. [more inside]
đ Rails + MongoDB? Absolutely.
Most of us default to PostgreSQL or MySQL when building Rails apps, but sometimes flexibility is key â and thatâs where MongoDB shines. [more inside]
đ Did you know Ruby can inspect your entire system environment without any external
From getting the current fileâs real path, accessing environment variables, checking user info, to even grabbing network detailsâpure Ruby has you covered. đ ïž [more inside]
Ruby/Rails upgrade step-by-step
Recently, Iâve upgraded Ruby/Rails in a project. [more inside]
đ New Article: Boosting Reactive Programming with JIT â Reactive Ruby in Action
Have you ever faced performance issues while working with reactive systems? [more inside]
đĄ Ever wondered how Ruby translates numbers into charactersâor even emojis?
In my latest article, I explore how Rubyâs .chr and .ord methods reveal the hidden logic behind ASCII, accented characters like âĂĄâ, and even emojis like âđâ. From raw bytes to multi-byte UTF-8 encoding, itâs a fascinating journey into how characters really work in Ruby. [more inside]
đ Keep your Ruby projects secure and up-to-date effortlessly! đ
Managing dependencies can be a headache â outdated or vulnerable gems put your app at risk. Thatâs why I wrote about Dependabot, the awesome GitHub tool that automatically scans, updates, and protects your dependencies. [more inside]
command_mapper-gen 0.1.1 released
command_mapper-gen 0.1.1 has been released with minor --help
output parsing bug fixes. [more inside]
Namespaced Pundit Policies Without the Repetition Racket
Tired of repeating super([:namespace, record]) in every controller when using namespaced Pundit policies? This post shows how to wrap that logic in a reusable concern for cleaner, more maintainable Rails code. One line to include, no more bracket spam. [more inside]
The History of Ruby on Rails: Code, Convention, and a Little Rebellion
As we say in Brazil: âTo Remember is to Reliveâ, and with the last Rails Conf approaching, nothing better than taking some time to give in to nostalgia and look back on the history of the most relevant Ruby Framework to date: Ruby on Rails. Read more
The Hotwire-Rails summit, or interactive multi-step forms at peak UX
Picture this: one day your product, which was built with Ruby on Rails in a canonical HTML-first (Hotwire) fashion, gets an âoff-worldâ feature request, namely, building a highly-customizable and amazingly-interactive user interface. You stare at Figma mockups scratching your head and mulling an unspeakable question: âIs the Renaissance at an end? Should we reach for React now?â Before you abandon ship, read the tips and tricks we devised while building a sophisticated multi-step form that rivals any SPA experience! The Hotwire-Rails summit, or interactive multi-step forms at peak UX
đ SOLID vs OOP in Ruby: Are We Just Repackaging the Same Ideas?
Iâve been reflecting on how often we see ânewâ principles like SOLID pop up in technical interviews and documentation. But when you dig into the details â especially in Ruby â many of these ideas are already part of the classic OOP toolbox. [more inside]
Adding llms.txt to a Rails application
Large Language Models are everywhere and are getting better at understanding the web almost in real time. However, because of the size of their context windows, they might miss key information about websites amidst ads, scripts, banners, or other irrelevant content that isnât about the actual information itself. Thatâs where the llms.txt file plays a role: it allows us to have a compressed version of our site or pages of our site in a format that LLMs easily understand: Markdown. In this article, we will learn how to add a llms.txt file to a Rails application and some best practices. [more inside]
Versioning API requests
Learn how to handle API request versioning in Rails without duplicating controllers, using a schema-based approach that supports OpenAPI documentation and seamlessly maps external API structures to internal models. [more inside]
đż Streaming CSV Data: Line-by-Line Processing Like Draining a Tank
Ever tried to drain a giant tank through a hose⊠and instead of water, what comes out are endless lines of CSV â fields, commas, and all? Thatâs exactly how it feels to stream CSV data in real-world systems. [more inside]
Measure your code with ease
https://github.com/igorkasyanchuk/time_m with this gem you can measure duration of your code with one line of code. Simplified and better version of something like Time.now - start.
Introducing Herb Language Server and Visual Studio Code Extension
As a next step for Herb, Iâm happy to share that Iâve just released the first version of the Herb Language Server along with a Visual Studio Code extension. [more inside]