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.
Adding your Rails app to the Home Screen - the Ultimate Guide
Rails 8 will support Progressive Web Apps (PWA) out-of-the-box but you have all the tools you need to make your Rails app installable today. This post goes in-depth to show you how. [more inside]
Ruby’s hidden gems: Sorbet
Let’s see how Sorbet addresses the challenges of dynamic typing in Ruby: https://blog.appsignal.com/2024/09/18/rubys-hidden-gems-sorbet.html
Generate a Rails 8 app with Nextgen
Nextgen, my interactive Rails app generator, now supports Rails 8! Use Nextgen to fine-tune your rails new
experience by selecting just the gems and frameworks you need. A version selector lets you choose between Rails 7.2, the 7-2-stable branch (edge), or Rails 8 alpha via the main branch. And a robust Vite option is also available for projects that need a modern Node-based frontend build system with fast hot-reloading. https://github.com/mattbrictson/nextgen/releases/tag/v0.24.0
Practical Guide for Database Scaling: how to use Postgres logical replication
How to scale databases using Postgres Logical Replication to optimize performance, manage read replicas and easily handle intensive loads. [more inside]
Lack of Support/Participation and the Software Engineering Code of Ethics
Some Software Engineers mention “not being interested” as an excuse not to help someone with something that could benefit customers or the Software Engineering community at large (including the Ruby community) when the real reason is in fact covert discrimination against that person and lack of effort to treat them as an equal and equally respected member of their community. Know that Software Engineers have to abide by the Software Engineering Code of Ethics. And, it includes the statements: “Software engineers shall act consistently with the public interest” and “Software engineers shall be fair to and supportive of their colleagues”. [more inside]
New Calendlyr version released 🚀 Support for all Calendly API calls
Easy and comprehensive rubygem for Calendly. Currently supports API v2. [more inside]
EuRuKo 2024 conference reflection
Last week I attended the EuRuKo conference in Sarajevo. It was super fun and I wrote a reflection on it from my point of view: EuRuKo 2024 conference reflection
Oktest 1.3.0 released
I released Oktest 1.3.0.
Oktest is a new-style testing library for Ruby.
You can write ok {1+1} == 2
with Oktest instead of assert_equal 2, 1+1
or expect(1+1).to eq 2
.
In addition, it is very easy to test JSON data by JSON matcher in Oktest. [more inside]
Query collections of ActiveModel objects like an ActiveRecord::Relation
Working with collections of ActiveModel
objects next to ActiveRecord
objects is always kinda awkward because the interfaces for filtering, sorting, and querying are so different 😫 This is why we just released ActiveModel::Relation
which attempts to provide the same interface to work with collections of ActiveModel
objects that you’re used to from ActiveRecord::Relation
🎉 Check out the repository to learn more!
Write your private methods like they're public
When designing my abstractions, I’ve always had a very binary view about separating private and public behaviors. A recent gotcha got me to reconsider my practice with a little more nuance. Now, I treat my private methods as if they were public methods.
RSpec Stubs The Object In Memory
Have you ever tested a method that pulls records out of the database and applied mocks to those records you just created in your test? Have you been surprised that the record does not appear to have the behavior you mocked out? I have an explanation of the situation for you and some options for how you can address it. [more inside]
Win a ticket to Rocky Mountain Ruby
Rocky Mountain Ruby is back this year (October 7 & 8), and Honeybadger is a Sapphire sponsor! To celebrate, we’re giving away a free conference ticket. Enter to win by 9/20.
🌶️ The Post-JAMstack Era: Just Use Rails.
Get your spicy 2024 hot-takes right here
Advanced forms in Hanami 2 - Complex views, 0 logic
Working with templates is a hard job and eliminating the logic out of them is absolutely not trivial. In this episode we’ll use Hanami tools to implement advanced forms with 0 logic in templates. [more inside]
How to Use Azure Blob Storage with Rails
With ActiveStorage’s built-in Microsoft Azure Storage Service, using Azure Blob Storage to manage file uploads in your Ruby on Rails app is easier than you think. Check out this article by Jeffery Morhous to learn how.
NextJS to Rails: The code that powers our new marketing site
I just finished rebuilding our marketing site in Ruby on Rails, and it’s such a joy to work with! In this video I take you on a tour of our new Rails-driven “content” site.
Separating env files for dev and production when using Kamal with Dotenv
Read how to cleanly handle .env conflict between Dotenv and Kamal
A change that makes experience with actual_db_schema even smoother
🚨 New in #actual_db_schema v0.7.9: No more frustrating halts on failed phantom migrations! Instead of “failing fast,” errors are now collected and reported in the console, keeping your workflow smooth and helping you complete schema dumps without interruptions. [more inside]
Updates to Everyday Rails Testing with RSpec, 2024 edition
Hi Ruby friends, I’ve pushed up the latest batch of updates to the 2024 edition of Everyday Rails Testing with RSpec, including: [more inside]