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.
Turbo 8 morphing deep dive - how does it work?
With Turbo 8 coming and morpinhg being set to be a big change to how we build Rails applications, I wanted to understand in detail how it all works and I’m writting it up a in mini series of articles with the first one here: Turbo 8 morphing deep dive - how does it work?
Pros and Cons of Deploying Rails Applications Natively vs Containerized in 2024
Explore deployment strategies—native vs containerized—by @julian_rubisch. Dive into the complexities, advantages, and practical aspects of each approach. Learn how they impact dev & production environments! [more inside]
Ruby 3.3 Introduces Range#overlap? method
Compare two ranges and see if they overlap each other with the Ruby overlap? method. It returns true if two ranges overlap each other. [more inside]
ORM vs. SQL | Rubber Duck Dev Show 111
In this episode, we discuss our thoughts on the use of Object Relational Mappers (ORMs) in our development compared with just using Structured Query Language (SQL): https://www.rubberduckdevshow.com/episodes/111-orm-vs-sql/
Ruby naming conventions
Remember, code is read more often than it’s written. [more inside]
Did you know that Ruby supports Pattern Matching?
Pattern Matching in Ruby allows for concise data destructuring, making it easy to assign variables with clear syntax. https://a-chacon.com/en/ruby/tip/2023/12/08/ruby-tip-pattern-matching.html
Flipper 1.1 (expressions alpha!)
We released 1.1 of the popular feature flagging gem Flipper. The tldr:
Your journey as a mid-level Ruby on Rails developer
You have been a Ruby on Rails developer for a couple of years. Get on board and let’s sail beyond the horizon. https://www.rubycademy.com/blog/mid-ror-dev
Rack-JetRouter 1.3.0 released
Rack-JetRouter is a super fast router library for Rack applications, derived from Keight.rb. [more inside]
Write resilient tests with matchers that take other matchers
Here’s a short, neat trick I learned to help save time when updating RSpec specs to reflect new test data: Use matchers that accept other matchers!
MiniLevenshtein
https://github.com/delonnewman/mini-levenshtein Simple, fast, levenshtein distance and similarity ratio for Ruby. Why? While there are many levenshtein distance implementations for Ruby, none provided a means to adjust edit scoring to make the calculations suitable for a similarity ratio.
Hacking on Ruby Prism with Kevin Newton
Want to contribute to an award-winning Open Source project? [more inside]
Optimising System Performance by Implementing a Read Replica Database in Rails
Implementing a read replica database to shift read requests away from the primary database, easing system load and enhancing performance efficiency. [more inside]
An endless method use case
While browsing some open source code I found a good case for refactoring using the endless method
How to Use Shoulda Matchers with RSpec for Ruby on Rails
Learn how to test functionality in your Rails app by using shoulda-matchers with RSpec: https://blog.appsignal.com/2023/12/06/how-to-use-shoulda-matchers-with-rspec-for-ruby-on-rails.html
BasedUUID: URL-friendly UUIDs for Rails models
I made a gem for encoding UUIDs into a URL-friendly, prefixed, base32 format. The rationale behind it is to provide a more manageable, “double-clickable” UUID format and allow for easy lookup (for any model, based on registered prefixes). Inspired by StripeIDs and ulid. [more inside]
re2 2.5.0: new matching interface and revamped documentation
Version 2.5.0 of the Ruby bindings to RE2 is now available. A “fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python”, it is designed to eliminate ReDoS attacks and make it safe to process patterns from untrusted users. The latest version features a new full_match
and partial_match
interface to match the underlying C++ library and revamped documentation.
How to add a man page to your Ruby project
Ever notice how when you run git clone --help
it displays it’s own man page instead of the usual --help
output? Ever wanted to add that same functionality to your Ruby CLI to make it more user friendly? In this blog post I will walk you through how to write a man page and add it to your Ruby command.
Better Mailer Previews — A Rails engine for improved ActionMailer email previews
Just released this gem — github.com/better_mailer_previews — keen for your thoughts!
Working As A Team In Software Development | Rubber Duck Dev Show 110
In this episode, we discuss working as a team in software development: https://www.rubberduckdevshow.com/episodes/110-working-as-a-team-in-software-development/
Ruby 3.3 resolves the Range#size bug for rational endpoints
Ruby 3.3 fixes a bug in Range#size when dealing with Rational endpoints, ensuring accurate element counting. Checkout my blog to learn more about it [more inside]