bountysource / core

Bountysource is the funding platform for open-source software.
https://www.bountysource.com/
MIT License
625 stars 187 forks source link

Docker build: bundler version mismatch for bountysource service #1523

Open src-r-r opened 3 years ago

src-r-r commented 3 years ago

Setup

Reproduction

Clone bountysource-core

Modify the env file as needed

$ docker-compose build
pgsql uses an image, skipping
sphinx uses an image, skipping
elasticsearch uses an image, skipping
Building bountysource
Step 1/9 : FROM ruby:2.7.0
 ---> ea1d77821a3c
Step 2/9 : RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
 ---> Using cache
 ---> d2306b01ece2
Step 3/9 : RUN mkdir -p /app
 ---> Using cache
 ---> bfcc592d70b2
Step 4/9 : WORKDIR /app
 ---> Using cache
 ---> f1ba3862ab98
Step 5/9 : COPY Gemfile Gemfile.lock ./
 ---> Using cache
 ---> eb02aae40ef3
Step 6/9 : RUN bundle install
 ---> Running in af179e6a42ed
Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.1.4). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.1.4`.
Your Ruby version is 2.7.0, but your Gemfile specified 2.7.1
ERROR: Service 'bountysource' failed to build: The command '/bin/sh -c bundle install' returned a non-zero code: 18

Seems to be this is an issue in one of the ~docker-compose files~ Gemfiles.

src-r-r commented 3 years ago

I'll get a PR for this issue soon, but the fix is this: Change Gemfile:

ruby '2.7.0' # Instead of '2.7.1'

Change Gemfile.lock, at the bottom:

RUBY VERSION
   ruby 2.7.0 # instead of 2.7.1

BUNDLED WITH
   2.1.2 # instead of 2.1.4
src-r-r commented 3 years ago

Created a PR for this issue: https://github.com/bountysource/core/pull/1524