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.
Today
Rehabilitation Centre: A Path Towards Recovery, Healing, and a Better Life
Introduction A rehabilitation centre plays an important role in helping individuals overcome physical, mental, emotional, and substance-related challenges. Life can become difficult when someone struggles with addiction, mental health conditions, injuries, or other health concerns. During such situations, professional guidance and structured care can make a significant difference in the recovery journey. A rehabilitation centre provides a supportive environment where individuals can receive professional treatment, develop healthy habits, and work towards regaining independence. With the right combination of medical support, counselling, therapy, and family involvement, people can gradually rebuild their confidence and improve their quality of life. What Is a Rehabilitation Centre? A rehabilitation centre is a healthcare facility that provides specialised treatment and support to people recovering from various health conditions. These facilities focus on improving physical abilities, emotional well-being, psychological health, and everyday functioning. Depending on an individual’s needs, rehabilitation services may include: Physical rehabilitation and mobility training. Psychological counselling and therapy. Alcohol and drug addiction treatment. Mental health rehabilitation. Behavioural therapy and emotional support. Social skills and life skills development. The primary goal is to help individuals achieve long-term recovery and become more confident and independent. Importance of Professional Rehabilitation Services Recovery is often a gradual process that requires patience, consistency, and professional supervision. Trying to manage serious health or addiction-related challenges without proper guidance can make the situation more complicated. Professional rehabilitation services provide structured treatment plans based on individual requirements. Experienced healthcare professionals assess each person’s condition and recommend suitable therapies. Some important benefits include: 1. Personalised Treatment Plans Every individual has different recovery needs. Rehabilitation centres develop personalised treatment programmes according to medical history, symptoms, lifestyle, and recovery goals. 2. Professional Medical Support Qualified healthcare professionals monitor progress and provide appropriate medical assistance whenever required. 3. Emotional and Psychological Support Counselling and psychotherapy help individuals understand their emotions, manage stress, and develop healthier coping strategies. 4. A Structured Daily Routine A balanced routine involving therapy, physical activities, relaxation, and healthy habits can support recovery and improve discipline. 5. Family Involvement Family counselling and educational sessions help loved ones understand the recovery process and provide appropriate support. Types of Rehabilitation Services Rehabilitation centres offer different services depending on the challenges individuals are experiencing. 1. Mental Health Rehabilitation Mental health rehabilitation supports people dealing with conditions such as depression, anxiety disorders, bipolar disorder, and other psychiatric concerns. Treatment may include psychiatric consultations, psychological counselling, medication management, and behavioural therapies. 2. Addiction Rehabilitation Addiction rehabilitation helps individuals struggling with alcohol, drug, and other substance dependencies. Treatment may involve medically supervised detoxification when necessary, individual counselling, group therapy, relapse prevention, and aftercare planning. 3. Physical Rehabilitation Physical rehabilitation focuses on improving movement, strength, balance, and mobility after injuries, surgeries, strokes, or other medical conditions. Physiotherapy and specialised exercises are commonly included. 4. Behavioural Rehabilitation Behavioural rehabilitation helps individuals recognise unhealthy behavioural patterns and develop positive habits. Therapy sessions focus on emotional regulation, communication, decision-making, and social interaction. How to Choose the Right Rehabilitation Centre Selecting an appropriate rehabilitation centre is an important decision. Individuals and families should consider several factors before choosing a facility. Qualified Professionals: Check whether the centre has trained doctors, psychiatrists, psychologists, therapists, and other relevant healthcare professionals. Treatment Approach: Look for personalised treatment plans that address individual needs. Safe Environment: Ensure the facility maintains appropriate hygiene, safety, privacy, and patient dignity. Family Support: Choose a centre that encourages healthy family participation when appropriate. Aftercare Services: Long-term recovery requires continued support, follow-up consultations, and relapse prevention strategies. Transparency: Understand the treatment process, costs, facilities, and expected care arrangements before admission. Role of Counselling and Therapy in Recovery Counselling and therapy are essential components of many rehabilitation programmes. They help individuals understand the factors affecting their well-being and learn practical ways to manage difficult situations. Different therapeutic approaches may include: Cognitive Behavioural Therapy (CBT). Individual counselling. Family therapy. Group counselling. Behavioural modification. Stress management techniques. These approaches can help individuals develop self-awareness, improve communication, manage emotions, and build healthier relationships. Why Family Support Matters Family support can make the rehabilitation journey more encouraging and manageable. People recovering from addiction, mental health difficulties, or physical conditions may experience emotional challenges. Families can contribute by maintaining a positive environment, attending counselling sessions, encouraging treatment adherence, and avoiding judgement or criticism. Understanding, patience, and consistent encouragement can help individuals feel supported throughout their recovery. Rehabilitation and Long-Term Recovery Completing a rehabilitation programme is an important milestone, but recovery often continues beyond the treatment period. Long-term success depends on regular follow-ups, healthy lifestyle choices, professional guidance, and a supportive environment. Aftercare programmes may include outpatient counselling, support groups, medical consultations, physical exercises, and relapse prevention planning. Individuals should follow professional recommendations and seek assistance whenever they experience difficulties during recovery. Conclusion A rehabilitation centre can provide individuals with the professional care, guidance, and support needed to overcome different health challenges. Whether someone requires addiction treatment, mental health rehabilitation, or physical recovery services, choosing the right facility is an important step towards a healthier future. With personalised treatment, qualified professionals, family involvement, and continued aftercare, individuals can gradually regain confidence, develop healthier habits, and improve their overall quality of life. Recovery takes time, but with appropriate support, positive change is possible.
Spec-Based vs Traffic-Based API Regression Testing on AWS
Differences between spec-based and traffic-based API regression testing on AWS. Learn how OpenAPI specifications, real API traffic, and automated test replay help identify regressions, validate API behavior, and manage AWS dependencies. Read more
When Rails Conventions Are Not Enough
Why business logic in a growing Rails application bounces between fat controllers and fat models, and how service objects and layered architecture give it a home. Read more
[Screencast] Idempotency
In this episode, we look at several different examples of background jobs and how we can refactor them to handle situations where they get called twice from either a user action or a retry. We’ll look at scenarios where we can prevent duplicate actions.
oops 0.4.0: now it can print, not just copy
You know the drill: a command blows up, you want to show it to someone, and suddenly you’re drag-selecting terminal output and typing code fences by hand. oops skips all that. Type oops and the last command plus its output lands on your clipboard as a Markdown block, with secrets masked. Read more
llm.rb v18.0.0 released!
llm.rb is a runtime that supports agentic development. This release requires Ruby v4 (with v4.1.0+ recommended, even as a preview1). The standout feature (from this release) is being able to run tool calls on Ractor. Works especially well with MCP tool calls. It worked before but was very rough around the edges. This release makes them first-class. The CHANGELOG includes everything. :)
The Agents on Rails Files: enter lemans, a Ruby harness for fair agent races
Meet lemans, the open source Ruby harness we built for the Agents on Rails benchmark. You’ll see how an eval task is composed, how we run and grade coding agents, and how cheaters shaped its guardrails (one even paid for its cheat sheet with our API key). Read more
Open Source Alternatives to Parasoft for API Service Virtualization on GCP
Explore open-source alternatives to Parasoft for API service virtualization on Google Cloud Platform (GCP). Discover how tools like Keploy help simulate dependent services, mock API responses, and create reliable testing environments without relying on expensive commercial solutions. Learn about key features, practical use cases, and how open-source service virtualization can simplify API testing, improve development workflows, and accelerate CI/CD pipelines on GCP. Read more
oops 0.3.0: copy the last shell command and its output as a Markdown block
oops is a small Ruby CLI with no runtime gem dependencies. It records your shell in the background, and oops copies the last command and its output to the clipboard as a paste-ready Markdown code block, with API keys and other secrets masked. It is handy for bug reports, pull request comments and asking for help. Version 0.3.0 adds fish support, oops clear, and deletes old logs of closed tabs after 7 days. Install with gem install oops-cli or Homebrew. (I am the author.)
The Open-Core task runtime that unlocks Ractors, unifies your backends, and delivers
The Open-Core task runtime that unlocks Ractors, unifies your backends, and delivers a 3× performance leap. Background job scheduling in Ruby has historically forced a brutal hardware compromise: suffer from Global VM Lock (GVL) limitations in multi-threaded modes, or deploy heavy, RAM-hungry isolated instances to parallelize workloads (Sidekiq) [1.7, 1.10]. The hardware physics & performance answer under native Linux (Debian Bookworm) & Ruby 4.0.7: Production telemetry benchmarks executed across a full 288-case matrix prove the raw power of SolidEngine’s Shared-Nothing model paired with isolated Ruby 4 Ractors [1.7, 1.10]: ⚡ Mixed Workload Crushing: On mixed workloads combining dense CPU processing and network wait, the SolidJobs + SolidEngine stack scales linearly up to 1,763 jobs/s at concurrency 8, delivering a massive 3.1× throughput gain over Sidekiq bottlenecked at 572 jobs/s by the GVL [1.7]. ⚡ Multiprocess Parity at −72.8% RAM: On pure CPU workloads, the Ractor-native layout matches the throughput of multiple isolated Sidekiq processes (2,021 jobs/s), while collapsing overall physical memory from 250 MiB down to only 68 MiB [1.7, 1.17]. ⚡ Zero-Overhead Density: Powered by a geometric sub-table partitioning layout (split-64) and a dedicated thread handling asynchronous memory trimming, the server’s idle RSS drops straight down to 5.6 MiB at rest via malloc_trim(0) [1.6, 1.7]. The core paradigm shift: Total backend flexibility out of the box With SolidJobs, your business task API remains strictly unchanged, but you select and swap your storage engines dynamically [1.10]: 🔹 The :solid_redis adapter: Powered by the highly optimized solid-redis gem, routing jobs to your Redis, Sentinel, or Cluster layout with isolated state, pools, and sockets per Ractor [1.7, 1.10]. It maintains a 5.5× speedup over single-process Sidekiq threads on CPU work [1.7]. 🔹 The :solid_engine adapter: Bypassing Redis completely to stream tasks directly over TCP/Unix sockets to our dedicated Rust server (SolidEngine), unlocking binary fencing, atomic leases, and native deduplication [1.10]. This architectural freedom includes per-channel routing, allowing both engines to run side by side for granular migrations. Routing all channels to SolidEngine makes Redis entirely optional, completely removing it from the production environment [1.10]. Version 0.6.0 is live and will be featured tomorrow night at Paris.rb [1.10]. Check the official repository for documentation, CSV matrices, and multi-language protocol examples [1.10]. Read more
White Box Testing: Techniques, Examples & Best Practices
Explore white box testing, its core principles, techniques, and practical applications in software development. Learn how developers use knowledge of internal code structure to validate logic, identify hidden defects, improve code coverage, and strengthen application reliability. Discover key approaches such as statement coverage, branch coverage, path testing, and condition testing, along with best practices and tools for building more robust software. Read more
IP-Based Route Restrictions on Heroku with Rails
Here’s how to restrict Rails routes to VPN-only IPs on Heroku, where the managed router doesn’t support IP filtering
Puma, Falcon or Pitchfork? Choosing a Rails App Server in 2026
A practical comparison of Puma 8.0, Pitchfork 0.18 and Falcon 0.57 for Rails on Ruby 4.0: concurrency models (threads vs forked processes vs fibers), what changed in each server this year, production configs for all three, a comparison table, how to measure GVL wait before switching, and a decision guide by workload. Also available in pt-BR. Read more
rbcop: RuboCop rewritten in Rust, about 14x faster in CI
rbcop is a drop-in replacement for RuboCop 1.92.2, written in Rust on Prism. It reads the same .rubocop.yml, takes the same command line and produces the same output, checked against RuboCop itself on nine large codebases: about two million offenses, zero differences, autocorrect included. In CI with a cold cache it runs about 14x faster than rubocop --parallel. Read more
When Two Background Jobs Target the Same Record
Two Rails jobs can save successfully and still lose an update. Trace Solid Queue’s concurrency keys and expiry, then compare atomic increments with optimistic locking using a small database reproduction. Read more
A new database for Rails
Over the past eight months, I’ve been building BicDB, a Rust-based database with PostgreSQL-compatible interfaces, full-text search, vectors, queues, and more. I relied heavily on AI coding agents (Claude and OpenAI), alongside roughly 1,200 hours of my own time. Read more
ruby2html 2.1.0 — write views in pure Ruby, render HTML faster than ERB and Phlex
ruby2html lets you write views as a plain Ruby block DSL — div(class: ‘card’) { h1 @title } — and renders clean, escaped HTML with a C extension doing the hot work (SIMD escaping, tag rendering, attribute serialization). No runtime dependencies. Works standalone, as Rails .html.rb templates, inside ERB, in ViewComponent, or as lightweight Ruby2html::Component classes. Read more
Asgard v0.6.0 adds Background Job Management
Asgard v0.6.0 is a task runner for any kind of project, with tasks written in Ruby. This release adds background jobs: sh "mkdocs serve", background: true starts a process that keeps running after asgard exits and logs its output, and asgard jobs list|stop|log|restart|clean manages those processes. A shells registry (shell, default_shell) picks the interpreter every sh runs under. 0.6.0 requires Ruby 4.0+ and has breaking changes: if you use schedules or the watcher, remove and stop them with the old version still installed, then upgrade, then reinstall and restart them.
beyond Ruby on Rails
Hey, I’m a Ruby on Rails developer who has been working with Rails since v1.2.3. I did many open-source projects (I think the total stars count >7K of all my projects), but now with AI era, it’s time to look at more things. Read more
API Regression Testing
Learn how API regression testing helps detect breaking changes, maintain backward compatibility, and ensure consistent API performance across releases. Explore practical testing approaches, real-world examples, essential checklists, CI/CD integration strategies, and tools like Keploy, Postman, Pact, and Schemathesis to build reliable automated API regression testing workflows and prevent production failures. Read more
Alchemy CMS 8.4
Bye, bye jQuery 👋 Alchemy CMS v8.4.0 has been released. See what else has been changed (spoilers: a lot) in the release notes at