Cannot connect to the Docker daemon after switching to OrbStack
Switching from Docker Desktop to OrbStack and stuck at Docker daemon error? Here’s how to fix itWhen Kamal cannot connect$ kamal build ERROR: Cannot connect to the Docker daemon at...
View ArticleExtending Rails authentication generator with registration flow
Rails 8 comes with a built-in authentication generator. However, it doesn’t yet come with registrations. Here’s how to add them.Rails auth generatorTo generate authentication scaffold, run:$ rails...
View ArticleBusiness Class 2.0 with Rails 8, Pay 8, Solid, Kamal 2, and fancy generator
The Ruby on Rails template Business Class gets a whole new edition. Rails 8, new licencing, and improved CRUD generator.Business Class 2.0The new Business Class is built on top of Rails 8, Pay 8, Solid...
View ArticleAuto-saving Rails forms with Turbo Streams
Here’s how to implement autosaving for inline input fields the Hotwire way.Autosaved formsWhat’s autosave? Autosaving is saving a user input automatically on changes, lost focus or after an interval of...
View ArticleAdding button loader to Turbo-powered forms
Turbo is a great way to build user interfaces, but most Turbo forms have to wait for the server response. Here’s how I am adding a small loading spinner to the submit buttons to improve the UX.Submit...
View ArticleSetting up Cloudflare R2 buckets for Active Storage
Rails comes with a built-in support for saving and uploading files to S3 and S3-compatible storage services in Active Storage. Here’s how to set up Cloudflare R2.Cloudflare R2To start using Cloudflare...
View ArticleCombining multiple sitemaps with a sitemap index
What if we need to combine multiple sitemaps for a main domain or subdomain? Here’s how to do it by creating sitemap index.Sitemap indexLet’s say our site has a regular sitemap.xml and a...
View ArticlePredownloading embedding models in Rails with Kamal
If you are building AI-powered applications in Ruby on Rails, you might have come across Informers or Transformers.rb gems for transformer inference. Here’s how to improve the production deployment of...
View ArticleRunning interactive sessions with Kamal
How to connect to a container on a server managed by Kamal and run an interactive session?Interactive server actionsKamal comes with a kamal server exec to execute a single command on the server. If we...
View ArticleRunning JavaScript after a Turbo Stream renders
Turbo comes with turbo:before-stream-render but unfortunately doesn’t ship with the equivalent turbo:after-stream-render. Here’s how to run JavaScript after the stream renders.Why we need thisIf you...
View Article