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.
Stream Updates to Your Users with LiteCable for Ruby on Rails
In the fourth part of this series, we’ll use LiteCable for WebSockets and stream updates to users via Turbo Streams: https://blog.appsignal.com/2023/12/13/stream-updates-to-your-users-with-litecable-for-ruby-on-rails.html
How and Why to Measure Dependency Freshness in Your Ruby Application
Whether you are working in a legacy Ruby application, or a brand new application, measuring your dependency freshness score can be a positive indicator to understand whether you are staying current or gradually falling out of date. [more inside]
How to Dual Boot your Application with Rails' Main Branch
You just finished upgrading your app to the latest Rails version and you made the decision to never stay behind and always be ready to upgrade as soon as possible… But how can you do that? [more inside]
Monke See, Monke Do - Let's generate 21000 monkes in a (28x28) pixel art edition
Hello, i prepared a 21 000 “Monke See, Monke Do” monke pixel art image (28px) collection. Yes, in ruby. The /monkesee-monkedo repo includes everything incl. the sprites / tiles / attributes, the random meta data generation, the image generation one-by-one in 1x and 8x and an all-in-one composite fam and more. happy pixel pushing with ruby.
Speeding up our Rails CI with Github actions and parallel_tests
This article outlines how we used parallel_tests and Github Actions to bring our CI times down from 25 to 10 minutes. It starts with an overview of our previous setup and its challenges, we them move on to setting requirements, the research we conducted, and the proof of concepts we tried out. We then discuss the implementation phase, highlighting some decisions we took along the way. The experiences and strategies shared in this article may hopefully offer useful ideas for you to enhance your own CI.
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