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.
Audit Logging in Rails
Need to add audit logging to your Rails application? In this post, I review five popular Ruby gems you can use, walk through rolling your own solution, and share some recommendations about what solution to choose.
3 useful examples of using typed structs in ruby.
Check out those 3 examples of useful applications for using dry-struct in your system. [more inside]
Punks, The William Shakespeare Edition - Super-Rare Never Before-Seen Pixel Portraits
Hello, in the ongoing pixel (art) programming series - yes, in ruby - I put together new samples. Let’s welcome Punks, The William Shakespeare Edition - Super-Rare Never Before-Seen (Pixel Punk) Portraits of the World’s Greatest Writer - Anno 2021. Yes, you can. (Re)generate super-rare never-before seen (pixel punk) portraits of the world’s greatest writer that you own 100% forever in your own home - see the genius/shakespeare script. Cheers. Prost.
ROM and Sequel over ActiveRecord?
Have you wondered what are the alternatives for ActiveRecord and why Hanami uses ROM instead? Here is why! [more inside]
Glimmer DSL for SWT File Drag and Drop
The Hello, Drag and Drop! sample included in Glimmer DSL for SWT has been enhanced with various different types of drag and drop in v4.21.2.2, including File Drag and Drop (files coming from outside the application). [more inside]
Oktest.rb 1.2.0 released -- performance improved
Oktest.rb 1.2.0 released, a new-style testing library for Ruby. In this release, performance improved. Now Oktest.rb runs about five times faster than RSpec. Other changes are listed in CHANGES.md. See README for details about Oktest.rb.
The hidden features of caller
I use Ruby’s caller feature a lot when I’m debugging and trying to figure out the stack trace of a particular code path. I used to think that it couldn’t do much beyond returning the full stack trace as an Array. But it’s got some tricks! Read more.
Setter Method Return Values In Ruby
Ruby setter methods may not return the result you expect them to. Find out what they return, and why, in this article.
command_kit 0.2.1 released
command_kit 0.2.1 has been released! This release contains many minor improvements and fixes. command_kit is a toolkit for building clean, correct, and robust CLI commands as plain-old Ruby classes. command_kit also provides many additional CLI features such as ANSI colors, OS/Distro detection, Package Manager detection, XDG directory support, opening a man page when --help is given, spawning less for paged output, etc.
Railway Oriented Programming In Rails Using Dry-Monads
It’s not every day that you learn a new approach to error handling for Ruby. In this article, Abiodun walks us through a novel error-handling process called Railway Oriented Programming and shows us how to implement it with dry-rb’s monads.
The Template Method Pattern in Ruby (video)
The Template Method pattern allows you to extract the parts of your code that stay the same into a base class and the ones that change into subclasses. [more inside]
Keeping time with TimescaleDB: understanding and integrating time-series data with Ru
⌛On the Martian blog, Backend Engineer Misha Merkushin addresses a timely question – how can we efficiently and effectively store time-series data when working with Ruby on Rails applications? [more inside]
Full Text Search in Postgres with View-Backed Models in Rails
Here’s a fast way to add full text search across multiple AR models using the PgSearch and Scenic gems, while also surfacing a distinct domain concept in your Rails application.
Real-world Concurrency with Ruby and Polyphony: a Telnet Chat App
In my latest article, I’ll show you how to implement a real-world fiber-based concurrent Telnet chat app using Polyphony. Along the way, I’ll demonstrate how Polyphony lets us write concurrent programs in a natural, idiomatic style, and show how fiber messaging, one of Polyphony’s unique features, allows us to design a concurrent app as a collection of simple, autonomous entities, each having a single responsibility.
Benchmarker 1.0.0 released -- pretty good benchark tool for Ruby
Benchmarker 1.0.0 released. Benchmarker is a pretty good benchark tool for Ruby. Iterate benchmarks, calculate average, print barchart and matrix, filter benchmarks, and so on. See https://kwatch.github.io/benchmarker/ruby.html for details.
Leveling Up Weekly: Ruby on Rails - Issue #3
Hello, I just released the third issue of my weekly newsletter, “Leveling Up Weekly: Ruby on Rails” - a curated Rails and Ruby focused newsletter targeted for junior to mid-level Rails developers. [more inside]
How to store timestamps in Rails
Why we should care about using TIMESTAMP WITH TIME ZONE for almost all timestamps in our apps:
How to Improve Code Quality on a Ruby on Rails Application
Does it take forever to ship even small features on the codebase you’re working on? Is the code hard to understand and maintain? Are projects always running over budget? Are you constantly sacrificing code quality and not paying down technical debt? [more inside]
Supercharge tests with crystalball + circle-ci
A four part tutorial on optimizing test suite using Crystalball (Regression Test Selection library). Also make it play nice with circle-ci parallel runs. Supercharge tests with circle-ci & crystalball
Best of Ruby Gems Series - Glimmer Days - glimmer-dsl-libui Gem - Desktop UI w/ libui
Hello, let’s thank Andy Maleh for the lastest addition to the glimmer family and to the ruby desktop universe - let’s welcome the Glimmer Mini-Language (Domain-Specific Language / DSL) for Desktop User Interfaces using libui for Linux / Apple Mac / Microsoft Windows. For the full story / write-up see Day 8 - glimmer-dsl-libui Gem - Prerequisite-Free Ruby Desktop Development Library. Happy desktop programming / scripting with ruby.
Rubber Duck Dev Show Episode 19 | How Much Time Should You Spend Planning
Hear two rubyists discuss how time you should spend planning before jumping into coding:
Run Your Rails App On Kubernetes: A Step-by-Step Tutorial
Kubernetes has become very popular in recent years as a way to deploy applications using containers. In this article, Geshan shows us how to get a Rails app up and running inside a local K8s cluster.
Announcing Hanami v2.0.0.alpha3
Announcing Hanami v2.0.0.alpha3 [more inside]