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.
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.
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
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:
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:
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]
[Screencast] Hotkeys
Keyboard shortcuts, or Hotkeys, can provide a great experience to users of an application. In this episode, we will use a stimulus wrapper around this library to use within our Ruby on Rails application. https://www.driftingruby.com/episodes/hotkeys
Benry-CmdOpt 2.4.0 and Benry-CmdApp 1.1.0 released
Benry-CmdOpt is a command-line option parser, much better than optparse.rb. [more inside]
We Love Monkes - Let's generate 5000 punks (24×24px) in a "We Love Monkes" edition
Hello, i prepared a 5000 “We Love Monkes” punks pixel art image (24px) collection. Yes, in ruby. The /welovemonkes 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.
SSH Key Switcher 1.0.1 has been released!
A simple and efficient Ruby gem for managing and switching between OpenSSH keys seamlessly [more inside]
kramdown-man 1.0.0 has been released!
kramdown-man 1.0.0 has been released! kramdown-man allows you to write man pages in pure markdown. This release adds support for definition lists, improved inter-man-page relative links, and an improved kramdown-man command.
Building a SaaS application in five minutes
Hello fellow developers! Today, I want to share an example of how to build a SaaS application in five minutes using the Lesli framework. [more inside]
Be careful when migrating Rails ActiveStorage app to different server
I’ve been migrating my personal Rails 7 project from Heroku to dedicated server. In this project I heavily rely on ActiveStorage for file uploads/images. [more inside]
ruby-install 0.9.3 released!
ruby-install 0.9.3 has been released! This release contains three important bug fixes for macOS users, namely ruby-install can now automatically select which openssl package version to use based on whether you are installing Ruby >= 3.1 (openssl-3.0) or Ruby <= 3.0 (openssl-1.1). See the Release Notes for more information.