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.
re2 2.0.0.beta1: vendored dependencies & precompiled native gems
The first beta release of a major new version of re2 which no longer requires Google’s underlying RE2 “fast, safe, thread-friendly” regular expression library to be installed as it is now vendored with the gem (ala Nokogiri and libxml2). To save compilation time, precompiled native gems are available for Linux, Windows and macOS. [more inside]
Intro to Ruby in the Browser (Talk Video)
Matz mentioned in his RubyConf 2022 keynote speech that in the future of Ruby, maybe we could start replacing JavaScript with Ruby in the browser… https://youtu.be/4AdcfbI6A4c?si=BIp_8Kd9nowuMCqr [more inside]
Rubidity - Ruby for Layer 1 (L1) Contracts with "Off-Chain" Indexer
Hello, as a follow up to Rubidity - A Ruby Dialect for Dumb (Blockchain) Contracts i have started a rubidity sandbox to experiment “off-chain” with the new ruby dialect and contracts. I invite you to join the fun and let’s explore and learn together.
Integration patterns for distributed architecture
Distributed architectures have been growing in popularity for quite a while for some good reasons. The rise of cloud services making the deployments simpler, as well as the ever-growing complexity of the applications, resulted in a shift away from monolithic architecture for many technical ecosystems. Microservices have emerged as an alternative solution offering greater modularity, scalability, reliability, agility, and ease of collaboration between multiple teams. Nevertheless, these benefits don’t come for free. The price to pay could be significant due to many factors, and one of them is dealing with some challenges that don’t necessarily happen when working on a monolith. One of such challenges is establishing the best way of integration and communication between services. [more inside]
Episode 418: I'm a teapot
A special release to celebrate 418 episodes. I talk about different HTTP response codes. https://www.driftingruby.com/episodes/i-m-a-teapot
Build dynamic navs with current_page? (and conditional classes) 🧭
I’ve written an article about how to build dynamic navs, using the current_page? helper
A few things I've learned while working in dev containers
In the past few months, I’ve added development containers to several Ruby on Rails (and other languages/frameworks) applications. I’ve learned a lot along the way, and wrote some off the cuff thoughts on how I approach dev containers, how I treat them differently from production containers, and where there’s still room for improvement. Hope you’ll check it out!
minitest-substitute
Ever wanted to modify an ENV variable, an instance or class variable (e.g. on Config) for the duration of a block or for all tests of a “describe” group? This pattern emerged repeatedly in my suites and as I don’t like to bloat my test/spec helper, about time for the lightweight and dependency-free minitest-substitute gem. Drop cumbersome before and after handling with one or more easy to read with "ENV['FOO']", "bar"
or with "@run_at", on: Config { Time.now }
declarations. Happy testing!
GemRuby Show : Vladimir Dementyev, ActionPolicy
Hi fellow Rubyists, [more inside]
Ruby and the State of Artificial Intelligence
In this article, we delve into the State of Artificial Intelligence and Machine Learning in the Ruby Ecosystem, exploring the tools available, challenges faced, progress made, and the potential for the future: https://blog.codeminer42.com/ruby-and-the-state-of-artificial-intelligence/
Active-subscription only ActionCable broadcasting
An extract of a technique I’ve been running successfully to only render and broadcast payloads over ActionCable for users that are actively subscribed to the channel: https://blog.jamesbrooks.net/posts/enhanced-broadcasting-with-actioncable/
Should You Resolve All Of Your Exceptions? | Rubber Duck Dev Show 98
In this episode of the Rubber Duck Dev Show, we discuss whether you should resolve all of your exceptions: https://www.rubberduckdevshow.com/episodes/98-should-you-resolve-all-of-your-exceptions/
System Tests
In this episode, we look at adding system tests in our application to test our Stimulus Controllers. We’ll also look at how to DRY up some of the tests and how to run them in a headless environment. https://www.driftingruby.com/episodes/system-tests
Unlocking the Power of Value Objects: A Fresh Approach to Cleaner Ruby Code
Do you find yourself running into the complexities of managing database adapters, or even just the intricacies of your own codebase? Ever thought there could be a simpler, cleaner way to deal with these challenges? [more inside]
Business Class 1.1 with Paddle Billing and improved scaffolding
Yesterday I released Business Class 1.1, a Ruby on Rails SaaS starter kit with support for Paddle Billing and an improved scaffolding generator which can now handle belongs_to associations.
What to do when the docs aren't enough
Software docs (Rails, Hotwire or otherwise), are often works in progress. Even well documented projects can be sparsely documented at their edges. What are you supposed to do when they aren’t enough? This article goes over five time-tested strategies and behaviors you can use when you reach a “docs dead-end” next time.
this JS ain't right - Arrow functions vs Function expressions
The this
operator in JavaScript can be confusing. Here’s a brief article which goes into how JavaScript figures out what the value of this
is, using some buggy Stimulus controller code as a starting point. [more inside]
Phoenix on Rails: Elixir and Phoenix for Ruby on Rails developers
Fancy learning something new? Phoenix on Rails is a 62-lesson tutorial on web development with Elixir and Phoenix, aimed at developers who already know Ruby on Rails. [more inside]
[Podcast] DHH joins the show to talk Rails 8, Delegated Types, Kamal and more!
In this episode, I’m joined by DHH to discuss Kamal, The Rails Foundation, Rails 8, Delegated Types, On Writing Software Well and a whole lot more! This episode is packed and a must-listen! [more inside]
Full-text search with SQLite and Ruby on Rails
SQLite has a fts5 extension for this, but there is no gem, like pg_search, to have a replacement. [more inside]
Launching my ActionMailer component library! 📬
hey RF, I’ve been working on an easier way to build mailer templates, and it’s finally ready! If that excites you, you can check out my ActionMailer components and templates.