ElMassimo/vite_ruby
62.4
Adequate · 19 September 2026
3.8k
lines of production code
Ruby
with TypeScript, JavaScript
1
measurement over time
What this system is
This system is a comprehensive Ruby gem ecosystem that integrates the Vite.js frontend build tool with various Ruby web frameworks, including Rails, Hanami, and Padrino. It provides core infrastructure for managing the Vite development server, asset compilation, and manifest handling, alongside framework-specific adapters that inject necessary view helpers and configuration. The project also includes opinionated plugins for features like legacy browser support and server-side rendering, along with example applications to demonstrate modern frontend workflows within Ruby applications.
How it got here
2021 — Core library extraction and framework expansion
42 changes.
The project refactored its architecture by extracting the core Vite integration logic into a standalone \vite\_ruby\ gem, removing the legacy \vite\_rails\ implementation. This period also saw the introduction of official integrations for Hanami and Padrino, alongside significant updates to the Vite plugin and example applications to support modern Ruby and Rails versions.
2022–2023 — vite-plugin-rails launch and tooling rewrite
6 changes.
This period focused on introducing vite-plugin-rails as an opinionated, ESM-only package that bundles essential Vite plugins for Rails projects, accompanied by a comprehensive example application. Significant effort was also dedicated to expanding test coverage for both the new plugin and the existing vite-plugin-ruby, while internal release and changelog tooling was rewritten in CommonJS to support the monorepo's mixed JavaScript and Ruby packages.
Features
Add Vite Rails Legacy entrypoint template for Rails 4
A new example entrypoint file (\application.js\) has been added to the \vite\_rails\_legacy\ templates, providing a starting point for integrating Vite with Rails 4 applications. The file includes instructions for using the \vite\_client\_tag\ and \vite\_javascript\_tag\ helpers, along with commented-out examples for importing TypeScript, JSX/TSX, Hotwired Turbo, Active Storage, and glob-imported channels.
_vite\_rails\legacy/templates/entrypoints · high confidence
Add example Vite entrypoint template for Rails
A new example entrypoint file (application.js) has been added to the template directory, providing users with a starting point for integrating Vite with Rails. The file includes console logs for verification, comments explaining how to use TypeScript or JSX variants via specific helper tags, and commented-out examples for importing libraries like @hotwired/turbo and ActiveStorage, as well as using glob imports for channels.
_vite\rails/templates/entrypoints · high confidence
Added development Procfile for Rails server
A new Procfile.dev template has been added to the project, configuring the web process to start the Rails server using bin/rails server. This facilitates local development workflows that rely on Procfile-based process managers.
_vite\rails/templates · high confidence
Added development and release utility scripts
The vite\_ruby package now includes two new executable scripts in the bin directory: a console script that launches a Pry REPL with the library loaded for interactive development, and a release script that delegates to the parent project's pnpm release workflow to publish the gem.
_vite\ruby/bin · high confidence
Added release script for vite\_plugin\_legacy
A new shell script named 'release' has been added to the vite\_plugin\_legacy/bin directory. This script serves as a wrapper to execute the pnpm release command for the vite\_plugin\_legacy package, allowing users to trigger the release process directly from this location.
_vite\_plugin\legacy/bin · high confidence
Added release scripts for Hanami and Rails packages
New executable release scripts have been added to the vite\_hanami and vite\_rails directories. These scripts allow users to trigger the release process for their respective packages directly from the command line by invoking the shared pnpm release workflow.
_vite\_hanami/bin, vite\rails/bin · high confidence
Executable CLI entry point for ViteRuby
A new executable script at \vite\_ruby/exe/vite\ has been added to provide a command-line interface for the ViteRuby gem. This entry point initializes the environment, loads the core library, and invokes the \ViteRuby::CLI\ to allow framework-specific libraries to extend the CLI functionality.
_vite\ruby/exe · high confidence
Hanami Bookshelf example app scaffolding and Vite integration
The Hanami Bookshelf example application has been scaffolded with a complete project structure, including environment configuration files for development and test, database setup, and RSpec test suites for controllers and views. The app integrates Vite for frontend asset management via the \vite\_hanami\ gem, featuring a dedicated development Procfile, environment-specific Vite configuration, and a proxy middleware setup in the Hanami environment config to support hot module replacement during development.
_examples/hanami\bookshelf · high confidence
Initial example application for vite-plugin-rails
The \vite-plugin-rails/example\ directory now contains a complete, runnable example application demonstrating the new \vite-plugin-rails\ package. This example includes a Vue 3 setup with Server-Side Rendering (SSR) support via Inertia.js, featuring entrypoints for JavaScript, SCSS, and CSS, along with configuration files (\vite.config.ts\, \config/vite.json\) that define build settings, aliases, and environment-specific ports. It serves as the reference implementation for how the plugin integrates Vite with a Rails asset pipeline.
vite-plugin-rails/example · high confidence
Initial release of VitePadrino integration for Padrino apps
This change introduces the VitePadrino gem (version 3.0.0), enabling Padrino applications to integrate with Vite.js. It provides tag helpers such as \vite\_client\_tag\, \vite\_javascript\_tag\, and \vite\_asset\_path\ to render necessary script and style tags, supports Hot Module Replacement (HMR) and React Refresh in development, and includes an installation script to automatically configure the app's Rakefile, layout, and Vite configuration files.
_vite\padrino/lib · high confidence
Initial template files for the vite\_ruby gem
This change introduces the default configuration and entrypoint templates for the newly separated vite\_ruby gem. It adds a Vite configuration file (vite.config.ts) that registers the Ruby plugin, a vite.json configuration file defining source directories and specific development/test ports (3036 and 3037), and a basic application.js entrypoint that logs a confirmation message. These files provide the foundational setup for integrating Vite with Ruby applications.
_vite\ruby/templates · high confidence
Introduce Vite Rails Legacy for Rails 4 compatibility
Adds the Vite Rails Legacy gem (version 3.1.0), enabling Vite integration for legacy Rails 4 applications. This new component provides a Rails Engine that bootstraps ViteRuby, configures default settings (such as handling proc-based asset hosts), and injects tag helpers into Action Controller and Action View. These helpers allow users to render Vite-processed assets via helpers like \vite\_javascript\_tag\, \vite\_stylesheet\_tag\, \vite\_image\_tag\, and \vite\_asset\_url\, while also supporting Hot Module Replacement (HMR) and React Refresh in development environments.
_vite\_rails\_legacy/lib/tasks, vite\_rails\_legacy/lib/vite\_rails\legacy · high confidence
Introduce ViteHanami gem for Hanami integration
This change introduces the ViteHanami gem (version 3.0.0), which integrates Vite Ruby with the Hanami web framework. It provides tag helpers (such as \vite\_client\, \vite\_javascript\, and \vite\_stylesheet\) for rendering Vite assets in Hanami views, an installation script that configures Hanami's middleware, Content Security Policy, and Rake tasks, and specific logic to handle Hanami's asset path prefixing.
_vite\hanami/lib · high confidence
Introduce legacy browser support via Vite plugin tag helpers
This release adds the \vite\_plugin\_legacy\ gem, which integrates \@vitejs/plugin-legacy\ into Rails applications. It provides new view helpers (\vite\_legacy\_javascript\_tag\, \vite\_legacy\_typescript\_tag\, and \vite\_legacy\_polyfill\_tag\) that automatically inject necessary polyfills and nomodule scripts for older browsers. The helpers are automatically registered via a Rails Engine, making legacy support available immediately without manual configuration.
_vite\_plugin\legacy/lib · high confidence
Introduce vite-plugin-rails as an opinionated Vite plugin for Rails
A new \vite-plugin-rails\ package is introduced to provide a Rails-specific, opinionated configuration for Vite. It bundles several plugins by default—including \vite-plugin-ruby\, \vite-plugin-environment\, \vite-plugin-full-reload\, \vite-plugin-stimulus-hmr\, \vite-plugin-manifest-sri\, and \rollup-plugin-gzip\—to reduce manual setup for typical Rails projects. The plugin supports configuration for compression (gzip/brotli), environment variable exposure, full page reloads on server file changes, Stimulus HMR, and Subresource Integrity (SRI). It also includes a duplicate plugin detector to help users migrating from \vite-plugin-ruby\ avoid configuration conflicts. The package is built as ESM-only targeting Node 20.
vite-plugin-rails · high confidence
Introduction of the core vite\_ruby gem with singleton-based configuration and dev server management
This change introduces the central \vite\_ruby\ library, establishing the foundational API for integrating Vite with Ruby applications. It provides a singleton \ViteRuby\ class that manages configuration via \configure\ and \config\, exposes asset versioning through the \digest\ method, and handles the lifecycle of the Vite development server via \dev\_server\_running?\ and \run\. The implementation includes built-in support for detecting companion libraries (such as \vite\_rails\ and \vite\_hanami\), loading framework-specific rake tasks, and managing the Vite manifest, effectively serving as the core engine that other framework-specific gems depend on.
_vite\ruby/lib · high confidence
Padrino blog tutorial integrates Vite.js for frontend asset management
The Padrino blog tutorial example now supports Vite.js for building and serving frontend assets. This change introduces a Vite configuration (vite.config.ts) and a Ruby integration (ViteRuby/VitePadrino) that allows the application to use modern JavaScript bundling with Hot Module Replacement (HMR) during development. Users can now run the Vite development server alongside the Padrino app via a Procfile, and the application views utilize Vite helper tags to serve compiled styles and scripts, replacing the previous static asset handling.
_examples/padrino\_blog\tutorial · high confidence
vite-plugin-ruby source code restructured and core plugin logic introduced
The \vite-plugin-ruby\ package source has been reorganized into the \src/\ directory, introducing the core plugin implementation (\index.ts\) that detects Ruby entrypoints, loads configuration from JSON and environment variables, and manages the Vite dev server lifecycle. This includes a new dev-server module (\dev-server.ts\) that writes and cleans up server metadata for Ruby integration, a configuration resolver (\config.ts\) that handles Vite version compatibility (including Vite 8.1 websocket transport changes), and an assets manifest plugin (\manifest.ts\) for fingerprinting non-JS/CSS entrypoints. The codebase also adds a dev-server landing page (\dev-server-index.html\) for direct browser access, updates utility functions for Windows path compatibility, and switches the globbing library from \fast-glob\ to \tinyglobby\.
vite-plugin-ruby/src · high confidence
Removals
Removal of Vite plugin source code and workspace configuration
The source files for the Vite plugin (including configuration loading, context management, and type definitions) and the pnpm workspace configuration have been deleted from the package. This removes the plugin's implementation and its associated multi-root workspace setup from this location.
package · high confidence
Removal of legacy Vite Rake task definitions
The \lib/tasks/vite/\ directory has been completely removed, eliminating the Rake tasks that previously handled Vite integration within the Rails asset pipeline. This includes the removal of tasks for installing Vite (\vite:install\), building assets (\vite:build\), cleaning output (\vite:clean\), and verifying installation (\vite:verify\_install\). Consequently, automatic integration with Rails asset precompilation and cleaning processes (such as \assets:precompile\ and \assets:clean\) is no longer provided by these task files, requiring users to rely on alternative mechanisms for these workflows.
lib/tasks · high confidence
Removal of the \`vite\_rails\` gem
The \vite\_rails\ gem has been removed from the codebase. This change eliminates the Ruby library that previously handled Vite integration for Rails applications, including asset management, development server proxying, and build orchestration.
_lib/vite\rails · high confidence
Behavioural changes
Added release script for vite\_padrino
A new executable release script has been added to the vite\_padrino/bin directory. This script facilitates the release process by changing to the project root directory and invoking the pnpm release command specifically for the vite\_padrino package, passing through any additional arguments.
_vite\padrino/bin · high confidence
Enforce commit message validation and staged linting via Husky
The project now automatically validates commit messages and lints staged files before every commit. A new commit-msg hook runs a verification script to ensure commit messages follow the required format, while a pre-commit hook executes lint-staged to check code quality on changes before they are committed.
.husky · high confidence
Example app restructured with Vue 3, TypeScript, and legacy browser support
The example application has been reorganized to demonstrate modern Vite and Vue 3 usage. The frontend assets have moved to a new \app/frontend\ directory structure, utilizing TypeScript for entrypoints (\main.ts\) and components (\HelloWorld.vue\, \App.vue\). The configuration (\vite.config.ts\) now uses \defineConfig\, includes an alias for \@assets\, and integrates \@vitejs/plugin-legacy\ to support older browsers like IE 11. Additionally, the example now includes a Server-Side Rendering (SSR) setup using Inertia.js and Vue 3, along with TypeScript declaration shims for \.vue\ and \.md\ files.
vite-plugin-ruby/example · high confidence
Hanami Bookshelf demo app now uses Vite for frontend assets
The Hanami Bookshelf example application has been updated to integrate Vite for managing frontend assets. This change replaces the previous asset pipeline with a modern build process, allowing the app to compile and serve TypeScript, SCSS, and static assets like SVGs. Users of this demo will now see Vite-specific helpers (such as \vite\_stylesheet\ and \vite\_typescript\) in the application layout, enabling features like hot module replacement and optimized asset bundling for the dashboard interface.
_examples/hanami\bookshelf/apps/web · high confidence
Project infrastructure overhaul and Ruby 4.0 support
The project has upgraded its runtime to Ruby 4.0.6 and switched its JavaScript package manager from Yarn to pnpm, introducing a pnpm workspace structure for the monorepo. Development tooling has been standardized with the adoption of the 'standard' Ruby linter, a new ESLint configuration, and a dedicated .node-version file for Node 24.20.0. Additionally, the repository now includes a Code of Conduct, a new logo, and updated documentation and contributing guides to reflect these structural changes.
(repo-wide) · high confidence
Rails example app upgraded to Rails 8 with Tailwind CSS 4 and Docker support
The Rails example application has been upgraded to Rails 8, replacing the previous database adapter from PostgreSQL to SQLite and migrating the frontend styling from Windi CSS to Tailwind CSS 4. The setup now includes full Docker support via a new Dockerfile and docker-compose configuration, and the frontend entrypoints have been updated to use @hotwired/turbo instead of the previous stack.
examples/rails · high confidence
Rake tasks now integrate with Rails asset pipeline and support SSR builds
The \vite.rake\ file now defines specific tasks for building assets (\vite:build\, \vite:build\_ssr\, \vite:build\_all\) and installing dependencies, while automatically enhancing or defining the standard Rails \assets:precompile\ and \assets:clobber\ tasks. This ensures that Vite dependencies are installed and assets are bundled during the Rails precompile step, with support for Server-Side Rendering (SSR) builds when enabled. The integration also handles legacy npm and yarn version compatibility by setting appropriate environment variables during the precompile process.
_vite\ruby/lib/tasks · high confidence
Refactored CLI into modular command classes with new build and SSR capabilities
The CLI implementation in \vite\_ruby/lib/vite\_ruby/cli\ has been restructured from a monolithic script into distinct command classes (Build, Dev, Install, SSR, Upgrade, etc.) using the dry-cli framework. This change introduces new capabilities for users, including the ability to build Server-Side Rendering (SSR) entrypoints via the \--ssr\ flag on the build command, run builds in watch mode with \--watch\, and profile builds with \--profile\. The \clobber\ command now supports a \--mode\ option to clear caches for specific environments. Additionally, the \install\ command now defaults to creating ESM-compatible \package.json\ files and allows specifying the package manager (npm, pnpm, yarn, or bun) during setup.
_vite\_ruby/lib/vite\ruby/cli · high confidence
Release tooling scripts rewritten in CommonJS
The repository's internal release tooling has been updated with new CommonJS scripts for generating changelogs, managing releases, and verifying commit messages. The new changelog script (scripts/changelog.cjs) automatically infers versions from Ruby gem version files for non-JS packages and generates changelogs using conventional-changelog. The release script (scripts/release.cjs) now supports both JavaScript and Ruby library releases, with specific handling for Ruby packages including Rubocop execution and version file updates. The commit verification script (scripts/verifyCommit.cjs) enforces conventional commit message formatting to ensure automated changelog generation works correctly.
scripts · high confidence
Removal of Vue-specific default installation template
The default installation files for the library have been removed, specifically the \lib/install\ directory which previously provided a Vue-based application scaffold (including \application.js\ with Vue imports, channel loading, and a red background CSS). This change eliminates the automatic setup of a Vue-specific frontend structure during installation, requiring users to provide their own entry points or choose a different framework configuration.
lib/install · high confidence
Standardized bin binstubs and added build/test helpers
The bin scripts for rake and rubocop have been updated to use double quotes for string literals, aligning with the project's standard style configuration. Additionally, new binstubs were introduced: 'bin/m' serves as a generic entry point for the 'm' gem, and 'bin/snapshot' automates the build and snapshot testing process for the vite-plugin-ruby package by installing dependencies, building the project, and copying the production output to the test app directory.
bin · high confidence
Updated test matrix to support Rails 7.2, 8.0, and 8.1 while dropping EOL versions
The gemfiles used for testing have been updated to include new configurations for Rails 7.2, 8.0, and 8.1, allowing the library to be validated against these newer versions. Conversely, support for older, end-of-life Rails versions (5.2 and 6.0) has been removed from the test matrix. The 'rails-edge' configuration has also been refactored to use gemspec paths for the split gems (vite\_ruby, vite\_rails, vite\_plugin\_legacy) instead of the previous monolithic structure.
gemfiles · high confidence
Vite Rails integration now delegates to Vite Ruby and adds modern tag helpers
The \vite\_rails\ gem has been refactored to act as a thin adapter for the \vite\_ruby\ core, shifting the underlying build and configuration logic to that library. This change introduces a comprehensive set of new view helpers (\vite\_client\_tag\, \vite\_javascript\_tag\, \vite\_typescript\_tag\, \vite\_stylesheet\_tag\, \vite\_image\_tag\, and \vite\_picture\_tag\) that simplify rendering Vite assets in Rails views, including support for the \\<picture\>\ element in Rails 7.1+. The integration also automatically configures Content Security Policy (CSP) rules during installation to support Hot Module Replacement (HMR) and sets the \javascript\_path\ to ensure Zeitwerk ignores frontend source files.
_vite\_rails/lib/vite\rails · high confidence
ViteRuby 3.11.0 introduces build caching and improved error diagnostics
This release upgrades the default Vite version to 8.0.0 and the plugin to 5.2.0. It introduces a build caching system that records build status and timestamps to skip redundant builds when watched files have not changed, and to intelligently retry recent failures. The library now provides significantly improved error messages for missing entrypoints, including details about the last build's success or failure. Additionally, it adds a CLI upgrade command, supports Bun as a package manager, and allows framework-specific libraries to extend the CLI.
_vite\_ruby/lib/vite\ruby · high confidence
vite-plugin-ruby v5.2.4 release and configuration defaults update
This release updates vite-plugin-ruby to version 5.2.4, which includes a fix for Vite 8.1+ WebSocket client port handling and a new method to detect if the dev server is running via a local file. The package configuration defaults have been updated to reflect modern standards: the source code directory now defaults to 'app/frontend' instead of 'app/javascript', and new options such as 'additionalEntrypoints', 'packageManager' (for experimental Bun support), 'base', and SSR build settings ('ssrBuildEnabled', 'ssrEntrypoint', 'ssrOutputDir') are now available in the default configuration.
vite-plugin-ruby · high confidence
Fixes
Fixes Rake task initialization and environment loading order
The Vite Rake tasks now correctly load the Rails environment before executing, preventing symbol errors and ensuring the application is fully initialized. This change also simplifies the installation of build dependencies by leveraging package manager flags and ensures that the Vite installation verification task is properly enhanced with the Rails environment dependency.
_vite\rails/lib/tasks · high confidence
Test coverage
Added Vite configuration and test app scaffolding; Added feature test for the admin home page; Added frontend entrypoint assets for the test application; Added test coverage for configuration, dev server, and entrypoints; Added test layout templates for dummy and test apps; Added test suite for vite-plugin-rails configuration and build output; Migrate test suite to ViteRuby and add comprehensive coverage; Removed test application JavaScript entrypoints; Updated test application configuration and added test fixtures; Updated test dummy app for Ruby 2.4 compatibility and SSR support.
Dependencies
Add VitePress documentation site and update example apps
This change introduces a new VitePress-based documentation site in the \docs/\ directory, configured with Vite 8, Vue 3, and the @mussi/vitepress-theme. It also updates the example applications (Rails, Hanami, Padrino, and the Rails engine) to use the latest versions of \vite\_ruby\, \vite\_rails\, and \vite-plugin-ruby\, ensuring they are aligned with current framework integrations and dependency requirements.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 62.
Lenses
- Code Health 86
- Architecture 78
- Maturity 68
- Readiness 56
- Security 69
- Domain Modelling 100
- Accessibility 62
Changes since last survey
- 300 commits — 249 feature/other, 51 fixes
By area
- (root) — 90 commits
- vite_ruby/lib — 38 commits
- docs/src — 32 commits
- .github/workflows — 20 commits
- vite-plugin-ruby/CHANGELOG.md — 20 commits
- vite-plugin-ruby/src — 19 commits
- examples/rails — 15 commits
- test/mounted_app — 11 commits
- vite_rails/lib — 10 commits
- (repo) — 6 commits
- test/helper_test.rb — 5 commits
- test/builder_test.rb — 4 commits
- docs/.vitepress — 2 commits
- gemfiles/Gemfile-rails-edge — 2 commits
- vite-plugin-rails/CHANGELOG.md — 2 commits
- vite-plugin-rails/tests — 2 commits
- vite-plugin-ruby/package.json — 2 commits
- vite_rails_legacy/CHANGELOG.md — 2 commits
- docs/package.json — 1 commit
- docs/pnpm-lock.yaml — 1 commit
Notable commits
- fix: chore: add "main" to package.json to fix eslint issues (#356)
- fix: chore: fix for "uninitialized constant ViteRuby::Manifest::OpenStruct" Error (#452)
- fix: chore: fix yaml parse error in ruby CI step (#467)
- fix: fix(BREAKING CHANGE): lookup now returns nil if auto-build fails (#268)
- fix: fix(breaking): check for any existing manifest path before cleaning
- fix: fix: Check if web entry already on Procfile.dev before appending it (#542)
- fix: fix: Early Hint links should be separated by a comma (#576)
- fix: fix: actually run vite inside bun (#492)
- fix: fix: add logger as a runtime dependency rather than default gem (#502)
- fix: fix: add crossorigin attribute to style tag (#544)
- fix: fix: add support for vite-rolldown (#571)
- fix: fix: adding web: to Procfile.dev during installation (close #599)
- fix: fix: allow new Vite v8 outputOptions callback shape (#604)
- fix: fix: avoid displaying manifest contents (close #568)
- fix: fix: avoid overriding hmr.clientPort when specified by the user (close #231)
- fix: fix: avoid removing double extension for non-preprocessor assets (#301)
- fix: fix: binstub creation (#589)
- fix: fix: bump up expected plugin version
- fix: fix: change default for ssrOutputDir so it's ignored by default
- fix: fix: check only once per second when dev server is not running (#377)
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
ElMassimo/vite_ruby was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 76fc36bcf3ada63bd1bbf3232fa16ecee42fadd9 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.