This Ruby on Rails app is inspired by (the popular?) Build a Twitter clone in 10 minutes with Rails, CableReady, and StimulusReflex by @hopsoft. Where @hopsoft used Rails 6.x, CableReady, and StimulusReflex to build a Twitter clone, here I used Rails 8.x and Hotwire instead. The key take away between this comparison is two-fold:
- Since Rails 6.x, in Rails 8.x+ you can more intuitively build a Twitter clone app with Hotwire
- and probably more importantly, you can build the same exact app using different tools (CableReady + StimulusReflex vs Hotwire)
This app uses the Solid Stack - Rails 8.1's Redis-free architecture:
- Solid Cache - SQLite-based cache store (replaces Redis)
- Solid Cable - SQLite-based Action Cable (replaces Redis)
- Solid Queue - SQLite-based job queue (replaces Redis)
No external services required - just SQLite.
Steps necessary to get the application up and running:
-
Ruby version: see Gemfile
-
System dependencies: none (uses SQLite, no Redis required)
-
Database creation:
rails db:create -
Database initialization:
rails db:migrate -
Start the server:
bin/dev(requires foreman/procfile) orbin/rails server -
Start Solid Queue worker (for background jobs):
bin/jobs -
Start Solid Cable (for real-time features): configured automatically in development via async adapter
- Run tests:
rails test - Run system tests (requires Chrome):
rails test:system