From 319d9fa648f98a88bdeb93ac74d1c3384b4e839d Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Wed, 18 Jan 2023 11:46:33 -0300 Subject: [PATCH] Run with the latest rubygems on newer Ruby versions Rails master on Ruby 2.7/3.0 is failing with the following error: Resolving dependencies... Could not find compatible versions Because every version of rails depends on RubyGems >= 3.3.13 and Gemfile-rails-main depends on rails >= 0, RubyGems >= 3.3.13 is required. So, because current RubyGems version is = 3.1.6, version solving has failed. Trying to run with the latest available rubygems to see if that can fix the problem, but sticking to the "default" rubygems version on older Ruby versions to avoid build issues there. --- .github/workflows/test.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a15b0cd7..207f5703 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -152,11 +152,18 @@ jobs: - name: Setup Bundler 1.x for Rails 4.x if: ${{ matrix.gemfile == 'gemfiles/Gemfile-rails-4-1' || matrix.gemfile == 'gemfiles/Gemfile-rails-4-2' }} run: echo "BUNDLER_VERSION=1.17.3" >> $GITHUB_ENV + - name: Setup Rubygems version as default for Ruby < 2.5 + if: ${{ matrix.ruby < '2.5' }} + run: echo "RUBYGEMS_VERSION=default" >> $GITHUB_ENV + - name: Setup Rubygems version as 3.2.3 for Ruby 2.5 + if: ${{ matrix.ruby == '2.5' }} + run: echo "RUBYGEMS_VERSION=3.2.3" >> $GITHUB_ENV - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true # runs bundle install and caches installed gems automatically - bundler: ${{ env.BUNDLER_VERSION || 'latest' }} + bundler: ${{ env.BUNDLER_VERSION || 'default' }} + rubygems: ${{ env.RUBYGEMS_VERSION || 'latest' }} - uses: supercharge/mongodb-github-action@1.3.0 if: ${{ matrix.env == 'DEVISE_ORM=mongoid' }} - run: bundle exec rake