How to Build a Web App with and without Rails Libraries
Builds a small birthday-tracker web app called Mirth from scratch in plain Ruby, then rebuilds it with Rails components to show what each layer abstracts away. It starts with a TCP server on Ruby's socket library and adds hand-written HTTP request-line parsing, GET/POST routing, Content-Length body reading and response construction with 303 redirects. Later sections add persistent storage and swap in Rack plus Rails libraries (Action Controller, Action Dispatch, Active Record, Action View). The payoff is a concrete picture of what Rails handles for you.
Related posts
- Turso Adds Ruby on Rails Support
Turso mediumAdeptTurso has released a technical preview of libsql_activerecord, an ActiveRecord adapter that connects Rails applications to Turso/libSQL databases. Setup takes three steps: add the gem, set adapter: libsql with a database url and auth_token in config/database.yml, and optionally set a local path for an embedded replica that syncs the remote database to a local file to remove network latency and allow offline work. The adapter also works outside Rails, in standalone ActiveRecord scripts and Sinatra apps, and supports migrations, CRUD, associations and raw SQL.
- Building a Business System Integration and Automation Platform at Shopify
Shopify Engineering mediumAdeptShopify replaced Mulesoft with an in-house Ruby on Rails platform for integrating internal business systems such as Salesforce, Airtable and Netsuite, because the proprietary JVM/XML tool sat outside Shopify's stack and couldn't easily reach internal services like Kafka. The platform is built around five priorities: minimal, transparent, flexible, secure and reusable. It implements them as a modular monolith of Rails Engines, single-method Actions for business logic, raw hashes instead of typed structs for data transformations, no business-data storage, and WebMock request-level tests. After a year it ran 18 integrations, had absorbed all the former Mulesoft apps, and was being used by other teams.
- Shopify-Made Patterns in Our Rails Apps
Shopify Engineering easyNoviceShopify's Rails monolith relies on a set of in-house patterns: the dev CLI for consistent environment setup, a podded architecture that shards the full infrastructure stack by shop, and domain-driven components that share a single database with no database-level foreign keys. Migrations are periodically squashed into structure.sql, and quality is kept up as the org grows through a git-based translation platform, an open-source maintenance tasks engine built on Active Job, and Monorail, which enforces versioned Kafka event schemas with PII annotations. It is pitched as an onboarding overview for new Shopify developers rather than a detailed implementation guide.
- Migrate a Rails App from Heroku to Render
Render mediumAdept
Migrating the open-source git-scm.org Rails app from Heroku to Render means mapping Heroku concepts (web/worker processes, dynos, Heroku Postgres/Redis, Scheduler, config vars) to Render equivalents and codifying the whole stack in a render.yaml Blueprint. The walkthrough defines a Ruby web service, wires PostgreSQL and Redis connection strings in through environment variables, and adds a bin/render-build.sh script for asset precompilation and migrations that Heroku's buildpack used to handle. It also prompts for secrets like the Bonsai Elasticsearch URL with sync: false, schedules nightly rake tasks as a standalone Cron Job, and deduplicates shared variables with an Environment Group. Practical tips include copying SECRET_KEY_BASE from Heroku so users stay logged in, adding a .ruby-version file, and checking Procfile, app.json and heroku.yml to discover the app's components.
- Migrating From Heroku To Railway
Railway mediumAdeptMoving a Heroku app to Railway comes down to three steps: deploy from a GitHub repo, import Heroku config vars, and add Postgres and Redis as separate database services. Railway reads the repo's Procfile and turns each named process (e.g. web, worker) into its own service, which takes the place of Heroku's dyno process model. It injects DATABASE_URL and REDIS_URL automatically, so any imported Heroku copies of those variables must be deleted or they will override Railway's. The guide also covers `railway run` for running commands like migrations against cloud variables, `railway up` for CLI deploys, and having apps listen on 0.0.0.0:$PORT so Railway can expose them.