6 mins read

Everything You Need to Know About Rails 8 and Its Benefits

Ruby on Rails 8.0 is packed with innovations like Solid Cable and production-ready SQLite. Explore why upgrading is worth it.
Glowing Ruby Gem representing the latest Ruby on Rails 8.0

Raisa Kanagaraj

Technical Content Writer

Glowing Ruby Gem representing the latest Ruby on Rails 8.0

You might have been building with Ruby on Rails for years, adapting to its evolution through versions 5, 6, and 7. Each Rails upgrade has brought its challenges, but also opportunities to create better, more efficient applications. Now, Rails 8.0 is here, offering a suite of powerful features designed to revolutionize the way we approach modern web development.

Yet, with every major release comes the crucial question: Is it worth upgrading your Rails application?

The answer is a big “YES”

Rails 8.0 isn’t just a simple version update; it’s a transformative release packed with cutting-edge features, all while staying true to the framework’s core philosophy of "convention over configuration."

Whether you're maintaining a legacy Ruby on Rails application or starting a new project, Rails 8.0 upgrade is crucial for your application's future.

What's New in Ruby on Rails 8.0?

Ruby on Rails 8.0 introduces a wealth of features designed to improve productivity, enhance performance, and simplify development workflows. Let’s explore these features in detail.

Effortless Deployments with Kamal 2 and Thruster

Rails 8.0 revolutionizes the deployment landscape with two powerful tools: Kamal 2 and Thruster. This combination transforms how developers push their applications to production, making it more straightforward than ever before.

Why it matters:

  • Eliminates dependency on expensive managed cloud services
  • Reduces deployment complexity
  • Enables rapid setup on standard Linux servers

Kamal 2 stands out with its simplicity - a single kamal setup command configures a production-ready environment on any Linux machine. This streamlined approach significantly reduces both deployment time and costs.

Kamal’s integration with Thruster, a Rails-specific proxy, brings several production-grade features out of the box:

  • Zero-downtime deployments
  • Built-in HTTP/2 support
  • Automated SSL certificate management via Let's Encrypt
  • Default Gzip compression
  • Multi-app hosting capabilities

For teams with established deployment workflows, Rails 8.0 maintains flexibility by allowing you to opt out of these features using the --skip-kamal flag.

Solid Trilogy: A Redis Alternative

Rails 8.0 introduces a game-changing approach to handling common web application requirements through its new "Solid" trilogy. These features dramatically simplify application architecture by reducing dependencies on external services like Redis.

Why it matters:

  • Simplified infrastructure management
  • Cost-effective scaling
  • Improved development-to-production parity

The Solid trilogy consists of:

Solid Cable

  • Serves as the default Action Cable adapter in production
  • Replaces Redis for pub/sub messaging
  • Uses efficient SQLite polling with performance comparable to Redis
  • Simplifies real-time feature implementation

Solid Cache

  • Leverages disk storage instead of RAM
  • Provides larger cache capacity at lower costs
  • Supports encryption and retention policies
  • Maintains high performance through modern SSD optimization

Solid Queue

  • Handles background job processing without Redis
  • Uses database-level locking for job management
  • Supports essential features like concurrency control and retries
  • Production-proven with 20M+ daily jobs at HEY

The Solid trilogy leverages modern SSD and NVMe drive capabilities, proving that disk-based solutions can effectively replace traditional RAM-based services for many common web application needs. This approach not only simplifies your application's architecture but also reduces operational complexity and costs.

SQLite Ready for Production

Rails 8.0 transforms SQLite from a development-only database into a production-ready powerhouse. This evolution comes from significant improvements to both the SQLite adapter and Ruby driver.

Why it matters:

  • Production-grade reliability
  • Simplified infrastructure
  • Enhanced performance capabilities

The new SQLite integration in Rails 8.0 brings several powerful features:

  • Native full-text search capabilities through virtual tables
  • Improved data seeding performance with bulk insert fixtures
  • Better concurrency through IMMEDIATE transaction mode
  • More robust error handling

Propshaft: The New Asset Pipeline

Rails 8.0 introduces Propshaft as its default asset pipeline, marking a significant shift from the traditional Sprockets system. This change reflects modern web development needs with a more streamlined approach.

Why it matters:

  • Simplified asset management
  • Better compatibility with modern JavaScript tools
  • Improved performance

Unlike Sprockets, Propshaft focuses on two core responsibilities:

  • Managing asset paths efficiently
  • Handling digest stamps for optimal caching

Built-In Authentication System

Rails 8.0 consolidates years of authentication-related features into a comprehensive, built-in authentication system. This system combines the best practices from previous Rails versions into a cohesive solution.

Why it matters:

  • Reduced dependency on external gems
  • Secure by default
  • Highly customizable

A single command sets up a complete authentication system:

Command for authentication

This command creates essential files, such as models, controllers, mailers, and views:

Command to create essential files, such as models, controllers, mailers, and views in Ruby on Rails 8.0

New Script Folder and Generator

Rails 8.0 introduces a dedicated script organization system. It provides a structured way to manage utility scripts and maintenance tasks.

Why it matters:

  • Better code organization
  • Improved maintainability
  • Standardized script management

You can generate scripts with a single command:

Command to generate scripts in Ruby on Rails 8.0

These commands generate the corresponding script files, which can be executed using:

Command to execute the script files in Ruby on Rails 8.0

Active Record Improvements

Rails 8.0 brings substantial improvements to its core components, particularly Active Record, enhancing database operations and management.

Key improvements include:

  • Rails 8 introduces differentiation between float4 and float8 types in PostgreSQL, allowing for more precise control over floating-point data.
  • The drop_table method now supports dropping multiple tables simultaneously, streamlining database cleanup tasks.
  • Support for PostgreSQL table inheritance and native partitioning has been added, enabling more advanced database design patterns and performance optimizations.
  • Bulk inserts for fixtures are now supported, significantly improving the performance of data seeding during tests or initial database setups.
  • When migrating a fresh database, Rails 8 optimizes the process by starting with the database schema load before executing migrations.
  • The createschema and dropschema operations are now reversible, enhancing the flexibility of multi-schema workflows.
  • Rails 8 has updated its requirements for MySQL, now mandating version 5.6.4 or later to take advantage of features like datetime with precision.
  • Query log tags are enabled by default in development, making it easier to trace SQL statements back to their origin in application code and identify the associated database.

Why Upgrade To Ruby on Rails Latest Version?

Upgrading your Rails application to version 8.0 brings several compelling benefits:

Enhanced Security: The latest version includes critical security updates and patches, making your Ruby on Rails application more secure against emerging threats.

Performance Improvements: With optimizations in Active Record and Action View, Rails 8.0 offers better performance out of the box.

Modern Development Experience: New features like the built-in authentication system and Propshaft streamline the development process and reduce dependency on external gems.

Future-Proofing: Staying current with Rails versions ensures your application remains maintainable and compatible with the latest gems and tools in the ecosystem.

Cost Efficiency: Modern features like Solid Cache and SQLite production readiness can potentially reduce infrastructure costs for smaller applications.

Conclusion

Ruby on Rails 8.0 is a monumental release that reinforces the framework’s position as a go-to solution for modern web development. With features like Turbo 2.0, built-in authentication, and production-ready SQLite, Rails 8 empowers developers to build faster, more secure, and scalable applications.

But here’s the catch—your existing Rails app may not be ready to take advantage of these improvements without an upgrade. That’s where tools like RailsUp, a Rails Upgrade Estimator, come in. RailsUp helps analyze gem compatibility, detect vulnerabilities, and estimate the time and effort required to upgrade your application to the latest version.

Modernizing your Rails application isn’t just an upgrade—it’s an investment in your app’s future.

Ready to upgrade your Rails application? Use RailsUp to get a detailed assessment and timeline for your upgrade journey.

Written by Raisa Kanagaraj

Your one-stop shop for expert RoR services

Join 250+ companies achieving top-notch RoR development without increasing your workforce.

Book a 15-min chat