Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gem install bundler Step Failing for docker-push-uat-image.yml Workflow #599

Closed
aaronskiba opened this issue Jan 12, 2024 · 2 comments · Fixed by #604
Closed

gem install bundler Step Failing for docker-push-uat-image.yml Workflow #599

aaronskiba opened this issue Jan 12, 2024 · 2 comments · Fixed by #604

Comments

@aaronskiba
Copy link
Collaborator

Example
https://github.com/portagenetwork/roadmap/actions/runs/7508020743/job/20442836823

The following error is shown when attempting to execute the Build and push Docker image step of the workflow:

#11 [ 6/15] RUN gem install bundler
#11 14.04 ERROR:  Error installing bundler:
#11 14.04 	The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.4.22. Try installing it with `gem install bundler -v 2.4.22`
#11 14.04 	bundler requires Ruby version >= 3.0.0. The current ruby version is 2.7.6.219.
#11 ERROR: process "/bin/sh -c gem install bundler" did not complete successfully: exit code: 1
------
 > [ 6/15] RUN gem install bundler:
14.04 ERROR:  Error installing bundler:
14.04 	The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.4.22. Try installing it with `gem install bundler -v 2.4.22`
14.04 	bundler requires Ruby version >= 3.0.0. The current ruby version is 2.7.6.219.
------
Dockerfile.production:36
--------------------
  34 |     
  35 |     WORKDIR $INSTALL_PATH
  36 | >>> RUN gem install bundler
  37 |     COPY Gemfile* $INSTALL_PATH
  38 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c gem install bundler" did not complete successfully: exit code: 1
Error: buildx call failed with: ERROR: failed to solve: process "/bin/sh -c gem install bundler" did not complete successfully: exit code: 1

Using my own fork of the repo, I was able to replicate the error. I was also able to fix the workflow by applying the following commit to in Dockerfile.production:
Screenshot from 2024-01-12 15-58-37
https://github.com/aaronskiba/roadmap/actions/runs/7508266562/job/20443403195

@aaronskiba
Copy link
Collaborator Author

The latest bundler versions are only compatible with ruby >= 3.0.0
https://rubygems.org/gems/bundler/versions

@aaronskiba
Copy link
Collaborator Author

The following warning is also outputted from a few GitHub Action workflows:

Your RubyGems version (3.1.6) has a bug that prevents required_ruby_version from working for Bundler. Any scripts that use gem install bundler will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running gem update --system 3.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant