pia-docker icon indicating copy to clipboard operation
pia-docker copied to clipboard

Ruby error when changing PIA_VERSION

Open jurgendigi opened this issue 3 years ago • 5 comments

When i change the PIA_VERSION ENV in the pia-back_service_ruby Dockerfile from 2.1.0 to 2.2.0 i get a Ruby build error:

18-May-2021 13:59:44 Step 12/15 : RUN bundle install
18-May-2021 13:59:44 ---> Running in a9492719b727
18-May-2021 13:59:46 Fetching gem metadata from https://rubygems.org/
18-May-2021 13:59:47 Fetching gem metadata from https://rubygems.org/............
18-May-2021 13:59:48 Your bundle is locked to mimemagic (0.3.3) from rubygems repository
18-May-2021 13:59:48 https://rubygems.org/ or installed locally, but that version can no longer be
18-May-2021 13:59:48 found in that source. That means the author of mimemagic (0.3.3) has removed it.
18-May-2021 13:59:48 You'll need to update your bundle to a version other than mimemagic (0.3.3) that
18-May-2021 13:59:48 hasn't been removed in order to install.
18-May-2021 13:59:48 The command '/bin/sh -c bundle install' returned a non-zero code: 7
18-May-2021 13:59:48 [echo] Building docker image failed with exitcode 7
18-May-2021 13:59:48  
18-May-2021 13:59:48 BUILD FAILED
18-May-2021 13:59:48 /scripts-astad/build-dockercontainer.xml:196:12: /scripts-astad/build-dockercontainer.xml:202:30: Building image failed
18-May-2021 13:59:48  
18-May-2021 13:59:48 Total time: 20.6726 seconds

Anyone knows how to solve this?

tnx!

jurgendigi avatar May 18 '21 12:05 jurgendigi

Get the same issue, it seems that we have to use mimemagic 0.4.0, trying to set this up

jdoucy avatar May 18 '21 13:05 jdoucy

@jurgendigi I just added bundle update mimemagic in docker/cnil-pia-back/Dockerfile

RUN gem install bundler
RUN bundle update mimemagic
RUN bundle install

jdoucy avatar May 18 '21 13:05 jdoucy

@jdoucy Worked like a charm. Tnx!

jurgendigi avatar May 18 '21 14:05 jurgendigi

Dear Team, i had the same error and after the gem install bundler i added the following line sof code

RUN apt install shared-mime-info RUN bundle update mimemagic Then it ran like a charm. I also created a pull request. Please take a look

rajesh-murali avatar May 19 '21 06:05 rajesh-murali

Hi @jdoucy hi @jurgendigi can you please review my pull request

rajesh-murali avatar Jun 01 '21 21:06 rajesh-murali