Published at: 2024-11-08

Rails 8 was released today, here’s what’s new in Rails 8

Kamal 2 + Thruster

Rails 8 have preconfigured Kamal 2 for deploying rails application everywhere. and Dockerfile has been upgraded to include new proxy called Thruster, which sits in front of the Puma web server to provide X-Sendfile acceleration, asset caching, and asset compression. This means there’s no need to put an Nginx or any other web server in front.

PS: you can pass --skip-kamal or --skip-thruster to disable kamal or thruster setup.

Solid

for websockets, jobs, and caching. the default stack provide new database-backed adapters named Solid Cable, Solid Queue, and Solid Cache.

Solid Cable

Solid Cable replace the need for Redis to serve websocket messages. As a bonus, Solid Cable retains the messages sent in the database for a day by default, which may ease debugging of tricky live update issues.

Solid Queue

Solid Queue replace job-running gem like Resque, Good Job or Sidekiq for most people.

Solid Queue can either run as a puma plugin, or by using the new bin/jobs command.

Solid Cache

Solid Cache replace need for Redis or Memcached for storing HTML fragment caches.

you can pass --skip-solid to disable solid gem

Propshaft

Rails 8 make Propshaft as the new default asset pipeline. it only does two things: Provide a load path for assets and stamp them with digests to allow for far-future expiry.

Generate basic authentications

in Rails 8, just run bin/rails generate authentication and we can get basic model for Session and User. and Login feature. though we have to implement sign-up feature.

for full changelog, visit 8.0.0 release note.