A guide on using Bun's standalone binary in Rails applications to eliminate the need for a system-wide Node.js installation. Covers how to download and configure the Bun binary, update Procfile.dev scripts, handle Docker setups with official Ruby images, and migrate from Webpack/Webpacker or esbuild. Also addresses patching jsbundling-rails to use the standalone binary path and configuring ExecJS to use Bun as its runtime. The approach simplifies project setup, avoids Node version manager conflicts, and supports TypeScript and npm packages without requiring Node.js.

6m read timeFrom fastruby.io
Post cover image
Table of contents
What is BunWhat about esbuild and others?System-wide or Standalone binary?Update scriptsDockerMigrating to BunThe assets:precompile taskConclusion
2 Impressions