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.
Ruby Warsaw Community Conference - New info!
Another speaker and workshops on Ruby Warsaw Community Conference announced! 🎫 📣 [more inside]
How to build a Rails API with rate limiting
How secure is your Rails API? Learn how to build an API with Ruby on Rails and use rack-attack to keep the bad actors out. A new article from Jeffery Morhous.
Blue Ridge Ruby is exactly what we need
“This year’s Blue Ridge Ruby conference in Asheville, North Carolina, was not only a wonderful experience but also highlighted the opportunity (and what’s at stake) in the Ruby community.” https://www.honeybadger.io/blog/blue-ridge-ruby-2024/
Rails 7: Default Dockerfile for Alpine Linux
I wrote a quick tutorial on modifying the default Rails 7 Dockerfile to use Alpine Linux. Alpine is a lightweight distribution that can result in much smaller Docker images for your apps. [more inside]
Hotwire Combobox
In this episode, we tackle the issue of slow-loading dropdowns with a high volume of options by implementing an asynchronous select using the Hotwire Combobox library. https://www.driftingruby.com/episodes/hotwire-combobox
Rails Generator Cheat Sheets
I created some free Rails generators cheat sheets to help create custom Rails generators. They consolidate the available actions, inflections, and other values available when creating Rails generators.
Automating PostgreSQL backups to Digital Ocean Spaces with Kamal
Here’s a short tutorial on automating PostgreSQL backups with Kamal. As a fan of Digital Ocean, I am using S3-compatible DO Spaces to store the backups.
Interactive Modals in Rails
There is a lot of talk about modals in Rails, and this tutorial shows you how with some Stimulus sprinkles, you can have very interactive modals. https://youtu.be/VKJ_1qoPTsE Link to code: https://onrails.blog/2024/06/01/interactive-modals/
Replacing system tests with unit tests
It’s amusing and affirming to me that system testing (in Rails) has been declared a failure. I could’ve told you that years ago! I’ve spent much of the past ten years working with test suites that are slow, brittle, and ultimately uninformative—almost always because they’re overly reliant on testing end-to-end. [more inside]
Puts Debuggerer 1.0.0 Includes Invoked Class/Method Name
Puts Debuggerer finally goes version 1.0.0, and it now has a very helpful new feature: printing the class name and method name as part of pd
printouts. For those unfamiliar with Puts Debuggerer, the project was inspired by a blog post by Aaron Patterson titled “I am a puts debuggerer”, which jokingly borrows from the wording of the comedy movie Dumb and Dumberer, turning debugger to “debuggerer”. The Puts Debuggerer Ruby gem aimed at automating most of the suggestions in that blog post.
https://andymaleh.blogspot.com/2024/05/puts-debuggerer-100-includes-invoked.html
Getting Started: Your Ruby On Rails App Hosted On DigitalOcean With AppSignal
In the first part of a two-part series, we’ll introduce how to set up DigitalOcean and AppSignal for a Ruby on Rails application: https://blog.appsignal.com/2024/05/29/getting-started-your-ruby-on-rails-app-hosted-on-digitalocean-with-appsignal.html
Gemfile of dreams: the libraries we use to build Rails apps
From time immemorial, the Evil Martians team has worked on dozens of Ruby on Rails projects. Naturally, this involves a lot of Ruby gems. Some reflect our desire to be cutting-edge and use modern tools (or build our own!) Other gems are so flexible they’ve been used in most of our projects. Our development philosophies, programming habits, (and soul) are within this universe of Martian gems. So what would it look like if they were somehow able to converge into one gemfile—the ideal Martian Gemfile, the toolbox of the extraterrestrial Rails engineer? Gemfile of dreams: the libraries we use to build Rails apps
ERb, Whitespace, and Indentation in Rails Generator Templates
Basic strategies for managing whitespace in generator ERb templates and their output. We can use whitespace-eliminating delimiters from ERb, generator helper methods, and built-in indentation helpers. https://garrettdimon.com/journal/posts/erb-whitespace-and-indentation-in-rails-generator-templates
Glimmer DSL for XML 1.4.0 HTML To Glimmer Converter
Glimmer DSL for XML (& HTML) 1.4.0 has been released! It includes a new HTML To Glimmer Converter that can automatically convert any legacy HTML code into Glimmer DSL Ruby code. Glimmer DSL for Web (Ruby in the Browser Web Frontend Framework) has been upgraded to include both Glimmer DSL for XML 1.4.0 and Glimmer DSL for CSS 1.4.0. https://andymaleh.blogspot.com/2024/05/glimmer-dsl-for-xml-140-html-to-glimmer.html
How to reuse the same page in different Turbo Frame flows
An elegant use of Turbo-Frame
request header to use the same page in different frame flows, different parts of UI: How to reuse the same page in different Turbo Frame flows
Launch of upgradecode.io: Simplify Your Code Upgrades!
We’re thrilled to announce the launch of upgradecode.io, a cutting-edge platform designed to streamline and simplify the process of upgrading your projects. Our platform offers automated tools to analyze your code, identify necessary updates, and provide actionable recommendations and patches. Whether you’re upgrading Ruby, Rails, or JavaScript projects, upgradecode.io makes your transition smoother with detailed insights and guided updates. We created a video to demonstrate this for you https://synvert.substack.com/p/launch-of-upgradecodeio-simplify
RailsConf 2024 Highlights
Best moments from RailsConf 2024 in Detroit: https://www.hexdevs.com/posts/railsconf-2024-highlights/
Ruby Fusion - Function Composition
Hey, folks. 👋 The next Ruby Fusion gathering is nearing: June 6th at 6:30pm MDT. We’ll be talking about function composition and unlocking the power of closures (i.e. procs, lambas, methods, etc). Registering and attending this virtual gathering is free so sign up if you can make it!
Glimmer DSL for WX 0.1.0 Hello, Data-Binding!
The wxRuby3 Ruby binding for wxWidgets (a very mature native cross-platform GUI toolkit) finally went version 1.0, so Glimmer DSL for WX, which runs on top of wxRuby3, has been upgraded to use version 1.0 by default. Also, a new feature has been added that is already available in most other Glimmer GUI DSLs: Unidirectional/Bidirectional Data-Binding. https://andymaleh.blogspot.com/2024/05/glimmer-dsl-for-wx-010-hello-data.html
[redis_queud_locks] version 1.5.0 released
The new version of RedisQueuedLocks (distributed redis locks with a queue capabilites in AdvisoryLock manner) released with a support for sampling logger: you can set the percent of RQL cases that should be logged. [more inside]