0

Rails project with Docker-compose. I needed to change the fork of a gem repository. It is simply a new fork, everything else is identical. So the source of the gem was changed in the Gemfile:

From: gem 'csv-importer', gh: 'fork-name/csv-importer', branch: 'custom-branch'

To: gem 'csv-importer', gh: 'new-fork-name/csv-importer', branch: 'custom-branch'

The project seems to work fine locally with the new forked gem. But when pushed to GitHub, the GitHub CI fails with this error message:
rake aborted! Bundler::GitError: The git source https://github.com/new-fork-name/csv-importer.git is not yet checked out. Please run 'bundle install' before trying to start your application

Some research was indicating that changes to the Dockerfile might fix it, but no go.

Here is the Dockerfile:

FROM ruby:2.6.3-alpine3.9

ARG bundle_without=development:test

RUN apk add --no-cache \
  # Bundler needs it to install forks and github sources.
  git \
  # Gems need the dev-headers/compilers.
  build-base \
  # PostgreSQL adapter needs the development headers.
  postgresql-dev=~11 \
  # Rails SQL schema format requires `pg_dump(1)` and `psql(1)`
  postgresql=~11 \
  # Install same version of pg_dump
  postgresql-client=~11

RUN mkdir /app
WORKDIR /app

COPY ./ ./
RUN bundle install --jobs=10 --no-cache --without=$bundle_without

EXPOSE 3000

CMD bundle exec puma -v --config=- --port=3000

How can I resolve this? Thanks

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
PolarisTLX
  • 329
  • 4
  • 18

1 Answers1

0

It's looking like the Gemfile.lock file was the culprit. Will possibly delete the question if this is not useful for anyone.

PolarisTLX
  • 329
  • 4
  • 18