Rails: Yarn executable was not detected in the system. Download Yarn at https://yarnpkg.com/en/docs/install
Rails asset tasks (assets:precompile, webpacker/jsbundling) need Node and Yarn but they're not installed/on PATH.
Yarn executable was not detected in the system. Download Yarn at https://yarnpkg.com/en/docs/installYarn executable was not detected in the systemWebpacker requires Node.js >= 6.0.0 and you are usingWebpacker can't find application.js in /public/packs/manifest.jsonbin/webpack: command not found Meaning
Install Node.js and Yarn (corepack enable / npm i -g yarn), run yarn install, and in Docker/CI install Node in the build stage before precompiling. Rails 7 jsbundling-rails runs yarn build; match the Node version in .node-version.
Common causes
- Node/Yarn missing in the image or server
- PATH missing Node (nvm not loaded)
- Webpacker/jsbundling needing
yarn install - Different Node version than expected
- Production precompile without devDependencies
⚡ Quick fix
corepack enable && yarn installbeforerails assets:precompile- Install Node in the Docker build stage
- Ensure PATH includes Node in CI/deploy scripts
Detailed fix by platform
Linux
node -v && yarn -v && bin/rails assets:precompile
How to diagnose
- Node — Installed?
- Yarn — Available?
- Stage — Docker build?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- ActiveRecord::AssociationTypeMismatch Rails: ActiveRecord::AssociationTypeMismatch: User(#1234) expected, got "42" which is an instance of String(#5678)
- ActiveRecord::ConnectionNotEstablished Rails: ActiveRecord::ConnectionNotEstablished: No connection pool for 'ActiveRecord::Base' found
- ActiveRecord::Deadlocked: PG::TRDeadlockDetected Rails: ActiveRecord::Deadlocked: PG::TRDeadlockDetected: ERROR: deadlock detected
Most viewed in Ruby / Rails
- ActiveRecord::PendingMigrationError Rails: ActiveRecord::PendingMigrationError — Migrations are pending. To resolve this issue, run: bin/rails db:migrate
- ActionController::InvalidAuthenticityToken Rails: ActionController::InvalidAuthenticityToken (Can't verify CSRF token authenticity)
- undefined method for nil Ruby: NoMethodError: undefined method `x' for nil (nil:NilClass)
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026