Build job: LoadError: libffi.so.6: cannot open shared object file: No such file or directory - /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/lib/ffi_c.so

Hi, I have this traceback error in a build job, I am using the image cimg/ruby:2.7.5-browsers and cimg/postgres:9.6.22 in a rails app

#!/bin/bash -eo pipefail bin/rails db:schema:load --trace

`Warning: the running version of Bundler (2.1.4) is older than the version that created the lockfile (2.3.10). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.3.10`.
rails aborted!
LoadError: libffi.so.6: cannot open shared object file: No such file or directory - /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/lib/ffi_c.so
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `block in require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/lib/ffi.rb:5:in `rescue in <main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/lib/ffi.rb:2:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `block in require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/native.rb:3:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `require_relative'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `block in require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sassc-rails-2.1.2/lib/sassc/rails.rb:5:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sassc-rails-2.1.2/lib/sassc-rails.rb:3:in `require_relative'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sassc-rails-2.1.2/lib/sassc-rails.rb:3:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `block in require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootstrap-4.3.1/lib/bootstrap/engine.rb:4:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `block in require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootstrap-4.3.1/lib/bootstrap.rb:61:in `register_rails_engine'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootstrap-4.3.1/lib/bootstrap.rb:11:in `load!'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootstrap-4.3.1/lib/bootstrap.rb:75:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/.rubygems/gems/bundler-2.1.4/lib/bundler/runtime.rb:74:in `block (2 levels) in require'
/home/circleci/.rubygems/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in `each'
/home/circleci/.rubygems/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in `block in require'
/home/circleci/.rubygems/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `each'
/home/circleci/.rubygems/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `require'
/home/circleci/.rubygems/gems/bundler-2.1.4/lib/bundler.rb:174:in `require'
/home/circleci/project/config/application.rb:9:in `<main>'
/home/circleci/project/Rakefile:6:in `require_relative'
/home/circleci/project/Rakefile:6:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:39:in `load'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:39:in `load'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:710:in `raw_load_rakefile'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/railties-5.2.5/lib/rails/commands/rake/rake_command.rb:22:in `block in perform'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/railties-5.2.5/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/railties-5.2.5/lib/rails/command.rb:48:in `invoke'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/railties-5.2.5/lib/rails/commands.rb:18:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/bin/rails:9:in `<top (required)>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
/usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/home/circleci/project/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'

Caused by:
LoadError: cannot load such file -- 2.7/ffi_c
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:27:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `block in require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/lib/ffi.rb:3:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `block in require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc/native.rb:3:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `require_relative'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `block in require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sassc-rails-2.1.2/lib/sassc/rails.rb:5:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sassc-rails-2.1.2/lib/sassc-rails.rb:3:in `require_relative'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/sassc-rails-2.1.2/lib/sassc-rails.rb:3:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `block in require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootstrap-4.3.1/lib/bootstrap/engine.rb:4:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `block in require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.5/lib/active_support/dependencies.rb:291:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootstrap-4.3.1/lib/bootstrap.rb:61:in `register_rails_engine'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootstrap-4.3.1/lib/bootstrap.rb:11:in `load!'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootstrap-4.3.1/lib/bootstrap.rb:75:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/.rubygems/gems/bundler-2.1.4/lib/bundler/runtime.rb:74:in `block (2 levels) in require'
/home/circleci/.rubygems/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in `each'
/home/circleci/.rubygems/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in `block in require'
/home/circleci/.rubygems/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `each'
/home/circleci/.rubygems/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `require'
/home/circleci/.rubygems/gems/bundler-2.1.4/lib/bundler.rb:174:in `require'
/home/circleci/project/config/application.rb:9:in `<main>'
/home/circleci/project/Rakefile:6:in `require_relative'
/home/circleci/project/Rakefile:6:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:39:in `load'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:39:in `load'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:710:in `raw_load_rakefile'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/railties-5.2.5/lib/rails/commands/rake/rake_command.rb:22:in `block in perform'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/railties-5.2.5/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/railties-5.2.5/lib/rails/command.rb:48:in `invoke'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/railties-5.2.5/lib/rails/commands.rb:18:in `<main>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/circleci/project/bin/rails:9:in `<top (required)>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
/home/circleci/project/vendor/bundle/ruby/2.7.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
/usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/home/circleci/project/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'

Exited with code exit status 1`

CircleCI received exit code 1

This is my .circleci/config.yml

version: 2
general:
jobs:
  build:
    parallelism: 1
    docker:
      - image: cimg/ruby:2.7.5-browsers
        environment:
          BUNDLER_VERSION: 2.1.4
          BUNDLE_PATH: vendor/bundle
          PGHOST: 127.0.0.1
          PGUSER: user_rails
          RAILS_ENV: test
      - image: cimg/postgres:9.6.22
        environment:
          POSTGRES_USER: db_rails
          POSTGRES_DB: db_rails_test
          POSTGRES_PASSWORD: db
    steps:
      - checkout
      - run: sudo apt update
      - run: sudo apt install python2.7 -y
      - run: npm config set python python2.7

      - run:
          name: Swap node versions
          command: |
            set +e
            wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
            export NVM_DIR="$HOME/.nvm"
            [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
            [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
            nvm install v12.16.1
            nvm alias default 12.16.1

            echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
            echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV

      # Restore bundle cache
      # Read about caching dependencies: https://circleci.com/docs/2.0/caching/
      - restore_cache:
          keys:
            - vlm-central-rails-{{ checksum "Gemfile.lock" }}
            - vlm-central-rails-

      - run:
          name: Update Bundler
          command: gem install bundler:2.1.4

      - run:
          name: Install Gems
          command: bundle install

      - save_cache:
          key: vlm-central-rails-{{ checksum "Gemfile.lock" }}
          paths:
            - vendor/bundle

      # Only necessary if app uses webpacker or yarn in some other way
      - restore_cache:
          keys:
            - vlm-central-yarn-{{ checksum "yarn.lock" }}
            - vlm-central-yarn-

      - run:
          name: Yarn Install
          command: yarn install --cache-folder ~/.cache/yarn

      # Store yarn / webpacker cache
      - save_cache:
          key: vlm-central-yarn-{{ checksum "yarn.lock" }}
          paths:
            - ~/.cache/yarn
      
      - run: ruby -v

      - run:
          name: Database setup
          command: bin/rails db:schema:load --trace

      - run:
          name: Run rspec in parallel
          command: bundle exec rspec

Why is using ruby 2.7.0 when the image uses 2.7.5?

Any hint on how to solve this issue would be highly appreciated.

1 Like

Probably this isn’t relevant for you anymore, but for future reference here’s what solved the same problem for me.

Clearing the dependency cache did the trick for me (https://support.circleci.com/hc/en-us/articles/115015426888-Clear-Project-Dependency-Cache). I simply add a versioning to my cache keys that I can bump when I need to.

I have no idea why this cache error occurs however, since ruby version is printed into the lock file and should trigger a cache invalidation.