System tests for rspec with capybara and selenium chrome driver

I am getting the following message in the buikd:

RuntimeError:
        Failed to make system call: ["/home/circleci/project/app/features/support/webdrivers/chromedriver", "--version"]

That’s of course, for all the system tests I am passing, the configuration file:

version: 2.1

orbs:
  ruby: circleci/ruby@1.1.0
  node: circleci/node@2
  browser-tools: circleci/browser-tools@1.1.0

jobs:
  build:
    docker:
      - image: circleci/ruby:2.6-stretch-node-browsers-legacy
      - image: redis@sha256:54057dd7e125ca41afe526a877e8bd35ec2cdd33b9217e022ed37bdcf7d09673
      - image: redis:6.0
    steps:
      - checkout
      - ruby/install-deps
      # Store bundle cache
      - node/install-packages:
          pkg-manager: yarn
          cache-key: "yarn.lock"
  test:
    parallelism: 1
    docker:
      - image: cimg/ruby:2.7-node
      - image: circleci/postgres:9.5-alpine
        environment:
          POSTGRES_USER: user
          POSTGRES_DB: appname
          POSTGRES_PASSWORD: ""
      - image: redis
    environment:
      BUNDLE_JOBS: "3"
      BUNDLE_RETRY: "3"
      PGHOST: 127.0.0.1
      PGUSER: user
      PGPASSWORD: ""
      RAILS_ENV: test
    steps:
      - checkout
      - ruby/install-deps
      - node/install-packages:
          pkg-manager: yarn
          cache-key: "yarn.lock"
      - run:
          name: Wait for DB
          command: dockerize -wait tcp://localhost:5432 -timeout 1m
      - run:
          name: Database setup
          command: bundle exec rails db:schema:load --trace
      - run:
          name: Wait for Redis
          command: dockerize -wait tcp://localhost:6379 -timeout 2m
          
      # Run rspec in parallel
      - ruby/rspec-test
      - ruby/rubocop-check

workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - test:
          requires:
            - build

Hi! I think this error usually means that the gem was unable to execute the binary driver for some reason.

Since you’re using Ruby, there are some good instructions over on this GitHub issue.

I hope that helps!

Hi, I sorted that out changing the path for the drivers although I get now the following:

 Webdrivers::BrowserNotFound:
   Failed to find Chrome binary.