Best of Rails2025

  1. 1
    Article
    Avatar of bytebytegoByteByteGo·50w

    Shopify Tech Stack

    Shopify processes massive scale with 173 billion requests on Black Friday using a tech stack built on Ruby on Rails, React, MySQL, and Kafka. The platform uses a modular monolith architecture with strict component boundaries, database sharding through isolated pods, and extensive tooling investments including YJIT compiler and Sorbet type checker. The infrastructure handles 284 million requests per minute at peak, 66 million Kafka messages per second, and processes 216 million ML embeddings daily for semantic search, all while maintaining developer productivity through comprehensive CI/CD pipelines and observability tools.

  2. 2
    Article
    Avatar of lonely_programmerLonely Programmer·43w

    PHP was created as a dead language

  3. 3
    Article
    Avatar of dhhDavid Heinemeier Hansson·34w

    We've all had enough of this nonsense

    DHH responds to recent attempts by Ruby community members to exclude him from Rails events, citing widespread community support against what he calls 'cancellation nonsense.' He references the end of RailsConf, the success of Rails World, and argues that normal community members are rejecting divisive tactics from a small group of critics.

  4. 4
    Article
    Avatar of rubylaRUBYLAND·40w

    Do you guys really do TDD?

    A developer explores a Reddit discussion about Test-Driven Development adoption, analyzing various perspectives on TDD implementation. The post examines common misconceptions about TDD, discusses the differences between frontend and backend testing approaches, and critiques AI-generated tests. Key insights include focusing on test failure cases, treating code as a liability, and understanding that TDD doesn't require knowing the implementation beforehand. The author emphasizes that effective testing should provide value and support code changes, while acknowledging that TDD isn't always the right approach for every situation.

  5. 5
    Article
    Avatar of hnHacker News·1y

    antiwork/gumroad

    The post provides a comprehensive guide on setting up a development environment for the 'antiwork/gumroad' project. It includes installation instructions for necessary dependencies like Ruby, Docker, MySQL, ImageMagick, libvips, FFmpeg, PDToolkit, Bundler, dotenv, and npm. The guide also covers creating SSL certificates, starting Docker services, and running the application along with Rails, a JavaScript build system, and Sidekiq worker. Additional setup steps like reindexing Elasticsearch and configuring git hooks are included.

  6. 6
    Article
    Avatar of communityCommunity Picks·1y

    Code snippet organizer for pros

    A detailed guide on setting up a Rails application on a DigitalOcean droplet using Ubuntu 16.04. The guide covers the creation of a non-root Rails user, adding swap space, installing and configuring NGINX, ElasticSearch, RVM, Rails, and Postgres. Additionally, it includes steps for deploying with Capistrano and securing the server with Let's Encrypt.

  7. 7
    Article
    Avatar of hnHacker News·23w

    Avoid UUID Version 4 Primary Keys

    UUID Version 4 primary keys cause significant performance problems in PostgreSQL due to their random nature. Random values trigger excessive index page splits during inserts, create fragmented indexes with poor density (~79% vs ~98% for integers), and require accessing 31,000% more buffer pages for queries. The randomness prevents efficient B-Tree index operations and degrades cache hit ratios. Time-ordered alternatives like UUID Version 7 perform better by including timestamps in the first 48 bits. For most applications, integer or bigint primary keys backed by sequences remain the optimal choice, offering better performance, smaller storage footprint (4-8 bytes vs 16 bytes), and natural ordering. When obfuscation is needed, pseudo-random codes can be generated from integers using XOR operations and base62 encoding.

  8. 8
    Article
    Avatar of rubylaRUBYLAND·1y

    Fix N+1 Queries Without Eager Loading Using SQL Subquery

    Learn how to address the N+1 query problem in Rails without resorting to eager loading. By leveraging SQL subqueries, you can fetch specific associated records directly within your main query, reducing memory consumption and improving performance. The post walks through a real-world example of fetching a member's latest activity timestamp efficiently, discussing various approaches and their trade-offs before demonstrating the optimal SQL subquery solution.

  9. 9
    Article
    Avatar of rubylaRUBYLAND·31w

    Announcing Attractive.js, a new JavaScript-free JavaScript library

    Attractive.js is a minimal JavaScript library that adds interactivity to websites using only HTML data attributes, requiring no JavaScript code. It supports actions like toggling classes, manipulating attributes, form submission, clipboard operations, and dialog handling through a simple data-action syntax. Designed as a lighter alternative to Stimulus for static sites and early-stage Rails apps, it works alongside Stimulus when more advanced functionality is needed. The library draws inspiration from Stimulus and Alpine but aims for maximum simplicity, making it ideal for quickly shipping Turbo-powered Rails applications with basic interactivity.

  10. 10
    Article
    Avatar of dhhDavid Heinemeier Hansson·37w

    Engineering excellence starts on edge

    Engineering teams achieve excellence by running unreleased edge versions of frameworks and libraries in production, becoming co-creators rather than just consumers. Companies like Shopify, GitHub, and 37signals have been running Rails 8.1 beta in production for nearly a year, catching bugs through automated testing and diligent development practices. This approach transforms teams from passive users to active contributors, significantly elevating their engineering competence and culture.

  11. 11
    Article
    Avatar of rubylaRUBYLAND·1y

    Boolean vs Datetime

    The post discusses refactoring an application to replace a boolean column used for tracking published statuses with a datetime column, providing improved functionality and flexibility.

  12. 12
    Article
    Avatar of programmingdigestProgramming Digest·43w

    PostgreSQL at Scale: Database Schema Changes Without Downtime

    Braintree Payments shares their refined approach to performing PostgreSQL schema changes without downtime in production environments. The post covers essential techniques including transactional DDL management, lock acquisition strategies, and safe operations for tables, columns, indexes, and constraints. Key strategies include using concurrent operations, breaking complex changes into smaller steps, and implementing forward/backward compatibility requirements. The team also open-sourced pg_ha_migrations, a Ruby gem that enforces DDL safety in Rails applications.

  13. 13
    Article
    Avatar of dhhDavid Heinemeier Hansson·25w

    Six billion reasons to cheer for Shopify

    Shopify processed $6.2 billion in sales on Black Friday 2025, a 25% increase from the previous year, handling 31 million API requests per minute and 53 million database reads per minute. The company, led by founder and programmer Tobi Lütke, continues to drive significant contributions to the Ruby and Rails ecosystems, employing nearly half of Rails core contributors and funding major improvements like YJIT and Ractors. This success demonstrates the scalability potential of Ruby on Rails at massive scale.

  14. 14
    Article
    Avatar of rubylaRUBYLAND·41w

    Undervalued: The Most Useful Design Pattern

    Explores using value objects, data objects, and factory methods to decouple software components and improve testability. Demonstrates refactoring a tightly coupled XML feed generator by separating concerns through domain boundaries, transforming ActiveRecord models into simple data structures that isolate business logic from external APIs and database dependencies.

  15. 15
    Article
    Avatar of dhhDavid Heinemeier Hansson·42w

    YouTube has earned its crown

    DHH reflects on YouTube's role as a reliable archive for technical content, contrasting it with Google's tendency to shut down other services. He highlights how YouTube has become his primary learning platform through tech creators and showcases his own channel featuring historical Rails content from 2006-2009. The post argues that YouTube deserves recognition as an international treasure for preserving educational content, despite broader criticisms of Google's business practices.

  16. 16
    Article
    Avatar of rubylaRUBYLAND·49w

    Thoughts on Freelancing for Web Developers

    Experienced web developers should target agencies and mid-sized businesses instead of small local shops or platforms like Upwork for freelance work. Agencies are better clients because they understand how to work with developers, have ongoing projects, established processes, and budgets for quality work. They offer repeat business and referrals, making freelancing more sustainable. The key is finding clients who already know how to work with developers and have long-term needs, focusing on building reliable relationships rather than competing on crowded platforms.

  17. 17
    Article
    Avatar of simplethreadSimple Thread·27w

    I Love You, Redis, But I’m Leaving You for SolidQueue

    Rails 8 introduces SolidQueue, SolidCache, and SolidCable as PostgreSQL-based replacements for Redis in the default stack. SolidQueue leverages PostgreSQL's FOR UPDATE SKIP LOCKED feature to handle job queuing without lock contention, eliminating the operational complexity of maintaining Redis infrastructure. The article provides a complete migration guide from Sidekiq to SolidQueue, including setup instructions, recurring job configuration, and Mission Control monitoring. While Redis remains necessary for high-throughput applications processing thousands of jobs per second, SolidQueue handles 200-300 jobs/second and is sufficient for most Rails applications, as demonstrated by 37signals processing 20 million jobs daily on PostgreSQL.

  18. 18
    Article
    Avatar of lobstersLobsters·1y

    Moving on from React, a Year Later

    Over the past year, Scholarly has made significant progress, including securing funding, achieving SOC 2 Type II compliance, expanding their team, and maintaining a simple technology stack with Ruby on Rails, Stimulus, and MySQL. The decision to move from React to a server-rendered approach has resulted in better testability, faster performance, and reduced complexity. Their focus on minimizing JavaScript use has led to more reliable and maintainable code. Scholarly remains committed to their current tech stack and confident in their approach moving forward.

  19. 19
    Article
    Avatar of hnHacker News·1y

    campsite/campsite: The Campsite monorepo

    The Campsite monorepo provides an open-source, self-hosted version of the Campsite app. Although it is not actively maintained, it serves as a reference for developers interested in the Campsite codebase. Setting up requires several services including S3 for storage, Pusher for real-time updates, Imgix for CDN, 100ms for video conferencing, and OpenAI for generating summaries. Additional configurations are required for other integrations like AWS ECS, Figma, Linear, and Vercel. Comprehensive setup instructions are provided to help run the app locally.

  20. 20
    Article
    Avatar of dhhDavid Heinemeier Hansson·25w

    Fizzy is our fun, modern take on Kanban (and we made it free to sel...

    Fizzy is a new Kanban-based project management tool that offers a modern, colorful interface for tracking work items across columns. Available both as a managed SaaS ($20/month after 1,000 free cards) and for free self-hosting, it uses the O'Saasy License which allows anyone to run their own instance while reserving commercial SaaS rights to the creators. The entire codebase is publicly available on GitHub, built with Rails, and designed to allow data portability between self-hosted and managed instances.

  21. 21
    Article
    Avatar of zaidesantonManager.dev·36w

    $7B startup Head of Engineering and dad of 5 builds a profitable side project

    A Head of Engineering at $7B startup Snyk shares how he built a profitable side project called Candl while managing five kids and a demanding job. He transformed his coaching practice into an AI-powered career planning tool by conducting extensive validation research, getting users before building, and using Ruby on Rails with AI assistance. The story emphasizes ruthless time management, setting scoped weekly goals, and being transparent about side projects with employers rather than hiding them.

  22. 22
    Article
    Avatar of rubylaRUBYLAND·1y

    Skeleton Frames

    The post demonstrates how to create dynamic and responsive cards in a Rails application using Turbo Frames and Active Storage for image management. It includes code snippets for setting up the controller, defining routes, and handling image variants to enhance the user interface.

  23. 23
    Article
    Avatar of rubyflowRuby Flow·1y

    Terminalwire is open source

    Terminalwire, an end-to-end client/server stack, is now open source under the GNU Affero General Public License (AGPL), allowing users to implement its functionality without concerns over future business shifts. The source code is available for Ruby and Rails, with plans to support other frameworks. The commercial license option offers further support, integration, and consulting services.

  24. 24
    Article
    Avatar of lobstersLobsters·37w

    basecamp/once-campfire

    Campfire is an open-source web-based chat application built by Basecamp that supports multiple rooms, direct messages, file attachments, search, notifications, and bot integrations. It's designed as a single-tenant solution with Docker deployment support, including built-in SSL, caching, and background job processing. The application can be configured with environment variables for SSL domains, Web Push notifications via VAPID keys, and error reporting through Sentry.

  25. 25
    Article
    Avatar of rubyflowRuby Flow·34w

    Supermail mailto links

    Supermail is a new Ruby gem that simplifies email handling in Rails applications through a cleaner abstraction. The gem enables developers to generate pre-populated mailto links by instantiating email objects, making it easy to create support workflows. The example demonstrates creating a support email for failed checkout sessions that includes the Stripe session ID, allowing users to contact support with pre-filled context directly from their email client.