Posted about 1 year 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.

Your development team has a full backlog of feature requests, chores and refactoring coupled with deadlines? We are familiar with that. With our "DevOps as a Service" offering, we support developer teams with infrastructure and operations expertise.

Owner of this card:

Daniel Straßner
Last edit:
about 1 year 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