inertia-rails-ssr

Automate Inertia Rails SSR integration with Vite Ruby and an SSR entry point.

36|1|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/cole-robertson/inertia-rails-skills --skill inertia-rails-ssr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: inertia-rails-ssr
Source: https://github.com/cole-robertson/inertia-rails-skills/tree/main/skills/inertia-rails-ssr
Command: npx skills add https://github.com/cole-robertson/inertia-rails-skills --skill inertia-rails-ssr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SSR for Inertia Rails apps pre-renders pages on the server to improve SEO, deliver faster initial content, and enable basic navigation when JavaScript is unavailable.

Core Features & Use Cases

  • Create an SSR entry point (app/frontend/ssr/ssr.js) for Vue 3 or React to render pages server-side.
  • Configure Vite Ruby and Rails to enable SSR, hydration, and SSR head injection for meta tags.
  • Use Case: SEO-critical pages load pre-rendered HTML, enabling search indexing and JS-disabled scenarios; deployment guidance is included for production SSR.

Quick Start

Install and configure the required tools in your Rails project, then add the SSR entry point and enable SSR in Rails:

  • Create app/frontend/ssr/ssr.js with the server setup for Vue 3 or React.
  • Update config/vite.json and config/initializers/inertia_rails.rb to enable SSR.
  • Update client entry points for hydration and include inertia_ssr_head in your layout.
  • Build and run SSR alongside Rails (bin/vite build --ssr and bin/vite ssr).

Frequently Asked Questions about inertia-rails-ssr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable server-side rendering for an Inertia.js Rails app?

Enabling server-side rendering for an Inertia.js Rails app involves creating an SSR entry point, updating Vite Ruby and inertia_rails.rb configurations, and adjusting client hydration. This pre-renders pages to improve SEO and deliver faster initial content.

What is the best way to configure SSR with Inertia Rails and Vite Ruby?

The best way to configure SSR with Inertia Rails and Vite Ruby is to create an app/frontend/ssr/ssr.js entry point, update config/vite.json, and enable SSR in config/initializers/inertia_rails.rb to handle page pre-rendering and head injection.

Does Inertia Rails SSR work with both Vue 3 and React?

Yes, Inertia Rails SSR works with both Vue 3 and React. You need to set up the respective server-side rendering logic in your app/frontend/ssr/ssr.js entry point to render pages server-side for either framework.

How do I add an SSR entry point for Inertia Rails?

To add an SSR entry point for Inertia Rails, create app/frontend/ssr/ssr.js with the server setup for Vue 3 or React. You then update client entry points for hydration and include inertia_ssr_head in your layout for meta tags.

Do I need Node.js to run Inertia Rails server-side rendering?

Yes, you need Node.js to run Inertia Rails server-side rendering. The process requires Node.js alongside Vite Ruby to build the SSR entry point and execute the server-side rendering via bin/vite build --ssr and bin/vite ssr.

Why should I use SSR with Inertia Rails instead of client-side rendering?

You should use SSR with Inertia Rails to enable search indexing for SEO-critical pages, deliver faster initial content load, and provide basic navigation capabilities when JavaScript is unavailable in the browser.