Every test fails with Errno::ENOENT: No such file or directory - --product-version

Like it says in the title, every one of my tests fails with the error message Errno::ENOENT: No such file or directory - --product-version.

How can I fix/troubleshoot this?

CircleCI config pasted below.

---
version: 2
jobs:
  build:
    working_directory: ~/my_app
    docker:
      - image: circleci/ruby:2.6.3
        environment:
          PGHOST: 127.0.0.1
          PGUSER: my_app
          RAILS_ENV: test
      - image: circleci/postgres:9.6.2-alpine
        environment:
          POSTGRES_USER: my_app
          POSTGRES_DB: my_app_test
          POSTGRES_PASSWORD: ""
    steps:
      - run: gem install bundler
      - checkout
      - type: cache-restore
        name: Restore bundle cache
        key: my_app-{{ checksum "Gemfile.lock" }}
      - run: bundle install --path vendor/bundle
      - type: cache-save
        name: Store bundle cache
        key: my_app-{{ checksum "Gemfile.lock" }}
        paths:
          - vendor/bundle
      - run: dockerize -wait tcp://localhost:5432 -timeout 1m
      - run: bundle exec rspec
1 Like

You may need to modify or remove your working directory.

Try adding run step that pwd prints the working directory and ls lists the contents to ensure the actions you are performing are in the correct directory.

Added pwd and ls. Directory looks fine (/home/circleci/my-app) and contents look fine too.

Any other ideas?

Sames but:

Error: ENOENT: no such file or directory, open '/home/circleci/project/version'
Emitted 'error' event on Domain instance at:
    at DestroyableTransform.emit (node:domain:525:12)
    at Pumpify.emit (node:events:526:28)
    at Pumpify.emit (node:domain:475:12)
    at Pumpify.Duplexify._destroy (/home/circleci/project/node_modules/duplexify/index.js:191:15)
    at /home/circleci/project/node_modules/duplexify/index.js:182:10
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/circleci/project/version',
  domainEmitter: DestroyableTransform {
    _readableState: ReadableState {
      objectMode: true,
      highWaterMark: 16,
      buffer: BufferList { head: null, tail: null, length: 0 },
      length: 0,
      pipes: Stream {
        _events: [Object: null prototype] {
          end: [Function (anonymous)],
          unpipe: [Function: onunpipe],
          drain: [Function (anonymous)],
          error: [Function: onerror],
          close: [Function: bound onceWrapper] {
            listener: [Function: onclose]
          },
          finish: [Function: bound onceWrapper] {
            listener: [Function: onfinish]
          }
        },
        _eventsCount: 6,
        _maxListeners: undefined,
        writable: true,
        readable: true,
        paused: false,
        autoDestroy: true,
        write: [Function (anonymous)],
        push: [Function (anonymous)],
        queue: [Function (anonymous)],
        end: [Function (anonymous)],
        destroy: [Function (anonymous)],
        pause: [Function (anonymous)],
        resume: [Function (anonymous)],
        [Symbol(kCapture)]: false
      },
      pipesCount: 1,
      flowing: true,
      ended: false,
      endEmitted: false,
      reading: true,
      sync: false,
      needReadable: true,
      emittedReadable: false,
      readableListening: false,
      resumeScheduled: false,
      destroyed: false,
      defaultEncoding: 'utf8',
      awaitDrain: 0,
      readingMore: false,
      decoder: null,
      encoding: null
    },
    readable: true,
    _events: [Object: null prototype] {
      end: [
        [Function: bound onceWrapper] { listener: [Function: onend] },
        [Function: bound onceWrapper] { listener: [Function: onend] }
      ],
      prefinish: [Function: prefinish],
      pipe: [Function: bound onceWrapper] { listener: [Function: onPipe] },
      data: [Function: ondata]
    },
    _eventsCount: 4,
    _maxListeners: undefined,
    _writableState: WritableState {
      objectMode: true,
      highWaterMark: 16,
      finalCalled: false,
      needDrain: false,
      ending: true,
      ended: true,
      finished: true,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function (anonymous)],
      writecb: null,
      writelen: 0,
      bufferedRequest: null,
      lastBufferedRequest: null,
      pendingcb: 0,
      prefinished: true,
      errorEmitted: false,
      bufferedRequestCount: 0,
      corkedRequestsFree: CorkedRequest {
        next: null,
        entry: null,
        finish: [Function (anonymous)]
      }
    },
    writable: false,
    allowHalfOpen: true,
    _transformState: {
      afterTransform: [Function: bound afterTransform],
      needTransform: true,
      transforming: false,
      writecb: null,
      writechunk: null,
      writeencoding: null
    },
    _destroyed: false,
    _transform: [Function: forward],
    _flush: [Function: flush],
    [Symbol(kCapture)]: false
  },
  domainThrown: false
}

Exited with code exit status 1