asset-pipeline-propshaft

Configure Rails 8 asset pipelines migrating from Sprockets to Propshaft.

21|2|Updated May 24, 2026
One-click install
npx skills add https://github.com/sandeepmvl/rails-skills --skill asset-pipeline-propshaft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: asset-pipeline-propshaft
Source: https://github.com/sandeepmvl/rails-skills/tree/main/skills/28-asset-pipeline-propshaft
Command: npx skills add https://github.com/sandeepmvl/rails-skills --skill asset-pipeline-propshaft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rails 8 replaced the default Sprockets asset pipeline with Propshaft, leaving many developers unsure how to set up new apps correctly or migrate existing Sprockets projects without breaking functionality. This Skill eliminates guesswork by providing clear, senior Rails developer-vetted guidance for all Propshaft-related workflows, avoiding common missteps like misconfigured bundlers or broken asset caching.

Core Features & Use Cases

  • Greenfield Rails 8 Setup: Guides selection of the right JavaScript (Importmap, jsbundling-rails, vite_ruby) and CSS (cssbundling-rails, Tailwind, Dart Sass) bundlers for your app's complexity.
  • Sprockets Migration: Provides a step-by-step audit process to identify incompatible Sprockets features (like .scss.erb or manifest directives) and a safe migration workflow that avoids combining with Rails version upgrades.
  • Production Configuration: Covers CDN asset host setup, digest stamping for cache busting, and far-future expiry header configuration for optimal performance.
  • Pitfall Avoidance: Explicitly calls out common mistakes to refuse, such as attempting to use Sprockets-specific preprocessing with Propshaft or shipping public sourcemaps.

Quick Start

Use the asset-pipeline-propshaft skill to configure the asset pipeline for your new Rails 8 application using Propshaft and the appropriate bundlers for your project's JavaScript and CSS needs.

Frequently Asked Questions about asset-pipeline-propshaft

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

FAQPage Schema
How do I migrate from Sprockets to Propshaft in Rails 8?

To migrate from Sprockets to Propshaft in Rails 8, audit your project for incompatible Sprockets features like `.scss.erb` files and manifest directives. Follow a safe, step-by-step migration workflow that avoids combining the asset pipeline transition with a Rails version upgrade.

Which JavaScript and CSS bundlers work with the Rails 8 Propshaft asset pipeline?

Propshaft works seamlessly with JavaScript bundlers like Importmap, jsbundling-rails, and vite_ruby, alongside CSS bundlers including cssbundling-rails, Tailwind, and Dart Sass. Select your bundlers based on your application's specific complexity requirements.

Can I still use Sprockets-specific preprocessing features after switching to the Propshaft asset pipeline?

No, you cannot use Sprockets-specific preprocessing features with the Propshaft asset pipeline. Propshaft deliberately eliminates Sprockets preprocessing, so attempting to use features like `.scss.erb` or shipping public sourcemaps will break your configuration.

How do I configure a CDN asset host and digest stamping for a Propshaft setup?

Configuring a CDN asset host with Propshaft involves setting up digest stamping for cache busting and applying far-future expiry headers. This ensures optimal production performance by adhering to Rails 8 asset pipeline conventions.

What is the best way to set up a greenfield Rails 8 asset pipeline?

The best way to set up a greenfield Rails 8 asset pipeline is using Propshaft with compatible JavaScript and CSS bundlers. Choose bundlers like Importmap or cssbundling-rails based on your project's complexity to ensure proper digest-stamped asset caching.