Posted 12 days ago. Visible to the public.

Yarn: if integrity check won't let you start rails console

I ran into a situation in which I received the yarn integrity check warning when starting the rails console even though everything was up to date and correct versions in use.

TLDR: run spring stop

I tried starting the rails console without switching to the correct node version first and received the yarn integrity warning.

warning Integrity check: System parameters don't match error Integrity check failed error Found 1 errors. ======================================== Your Yarn packages are out of date! Please run `yarn install --check-files` to update. ======================================== To disable this check, please change `check_yarn_integrity` to `false` in your webpacker config file (config/webpacker.yml). yarn check v1.22.5 info Visit for documentation about this command.

To get this fixed I made sure, that I'm on the correct node version (nvm use to use the version from .nvmrc), ran yarn install to update node packages.
The yarn command returned success Already up-to-date, so you should be fine to start a rails console. But I still received the yarn error instead:

To really fix this I also had to stop spring by running spring stop. This will drop everything that was cached by spring.

Further reading

Most of the times you run into issues like this if you forget to switch to the correct node version before executing any command. The obvious improvement is to automatically switch node versions when changing directories.

Growing Rails Applications in Practice
Check out our new e-book:
Learn to structure large Ruby on Rails codebases with the tools you already know and love.

Owner of this card:

Daniel Straßner
Last edit:
6 days ago
by Daniel Straßner
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Daniel Straßner to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more