The Moment You Whisper “rails s” at a Production Server
You ssh in. Your palms sweat. You type rails s. You wait for applause, investor emails, and perhaps a tasteful confetti cannon. Nothing happens - except your terminal looks smug. It’s giving “local dev, but make it fashion.”
Mock warning: Do not taunt “rails s” in production. Side effects may include 502 gateways, vanishing logs, and your CEO asking what “puma” is.
Why It Feels Tempting (And Why It’s a Trap Door)
- It works on your machine.
- It works on your machine.
- It only works on your machine.
“rails s” is great for brunch coding and vibes. But prod wants reverse proxies, SSL, systemd, environment secrets, log rotation, zero-downtime restarts, and that one Nginx config you bookmark but never read. Also known as “grown-up chores with error pages.”
Fake Solutions That Definitely Won’t Help (But Sound Amazing)
- Deploy via AirDrop to your server (just throw the bytes harder).
- Scale with a sticky note that says “Be Fast.”
- Replace Nginx with a vision board.
- Rely on cron to restart rails s every minute (for that artisanal chaos).
- Print your JWTs on a mug so auth feels warm and secure. Security solved.
What Production Actually Wants (Sorry)
- A real app server (Puma) behind Nginx (or Caddy) with SSL.
- Systemd services to keep processes alive after ssh exits (unlike rails s, which faints at the first sign of adulthood).
- Background jobs that don’t vanish when your laptop sleeps.
- CI/CD so pushes become predictable, not folklore.
- Auth, roles, payments, APIs, and tests that don’t collapse when someone clicks “Sign Up” twice.
Yes, you can duct-tape this together. Yes, you will become the duct-tape.
The Callback You Knew Was Coming
Remember when we said rails s is fine for brunch coding? It’s also fine for:
- Hackathons (with pizza)
- Local demos (with apologies)
- That one late-night “quick check” (with tears)
- But not production. (with lawyers)
The Pragmatic Shortcut (That Doesn’t Smell Like Utility-Class Soup)
You can keep rebuilding the same scaffolding, or you can start on a production-ready foundation that ships with auth, roles, admin, REST API (JWT + Swagger), RSpec/Capybara, background jobs, CI/CD, and deployment via Mina/systemd/Nginx - already wired cleanly. Less déjà vu, more MVP. If you prefer Bootstrap over utility-class origami, you’ll feel right at home - classic, stable, and fast to style without a second monitor of class names. It just… looks like a website. Imagine that.
Three Real Outcomes (Two Normal, One Spicy)
- You deploy properly, ship sooner, sleep at night.
- You keep hand-rolling prod, learn hard lessons, grow character.
- You run rails s in prod and become a campfire story.
Quick Sanity Checklist Before You Ship
- Nginx reverse proxy (with SSL) (and no, Cloudflare alone isn’t a personality)
- Puma with workers/threads tuned to reality (not vibes)
- systemd for services and logs (ctl > crying)
- Background jobs wired and visible (Sidekiq or friends)
- CI/CD that runs tests before your users do
Silly Sign-Off
Ok, your turn. Deploy like a pro, build the feature, ship the thing. I’ll be over here not running rails s in prod - refreshing the dashboard like it’s Instagram and my app is an influencer.