Why Use Rails for a Static Site?
There are plenty of static site generators out there — Jekyll, Hugo, Eleventy, Astro. So why would you use Rails?
The answer is simple: you already know Rails. If you're a Rails developer, you don't need to learn a new templating language, a new content pipeline, or a new way of organizing code. ERB, partials, helpers, layouts, the asset pipeline — it all just works.
Rails also gives you ActiveRecord, which is far more powerful than the file-based content systems most static generators use. You can model relationships between content (posts belong to categories, pages have metadata), query with scopes, and seed your database with whatever data you need. The demo app for rails2static uses a SQLite database that's committed to the repo, so the content is always available at build time.
Scaffolds are another underrated advantage. Need an admin interface to manage content? Run rails generate scaffold and you have full CRUD in seconds. Exclude the admin routes from the static build with an exclude_patterns config, and your admin interface exists only in development.
The trade-off is build time — Rails boots slower than Hugo. But for sites with hundreds or even a few thousand pages, the build completes in seconds. And you only pay that cost at deploy time, not on every page view.
Rails2static bridges the gap: build with the framework you love, deploy with the simplicity of static files.