Skip to content

Ruby 2.3 to 2.5 can't install bundler #422

@MaxLap

Description

@MaxLap

Ensure the following before filing this issue

  • I verified it reproduces with the latest version with - uses: ruby/setup-ruby@v1 (see Versioning policy)

  • I tried to reproduce the issue locally by following the workflow steps (including all commands done by ruby/setup-ruby, except for Downloading Ruby & Extracting Ruby),
    and it did not reproduce locally (if it does reproduce locally, it's not a ruby/setup-ruby issue)

Are you running on a GitHub-hosted runner or a self-hosted runner?

GitHub-hosted runner

The workflow code or a link to the workflow file

https://github.com/MaxLap/activerecord_where_assoc/blob/master/.github/workflows/run_tests.yml

Link to the log of a failed workflow job, or to a gist with the output

https://github.com/MaxLap/activerecord_where_assoc/actions/runs/3771542199/jobs/6412280221

The command and output of the failing step

On a Ruby 2.3 to 2.5 installation (I tested the command with ruby 2.4.10p364 locally and have the same problem):


gem install bundler -v '~> 2.0'
ERROR:  Error installing bundler:
	The last version of bundler (~> 2.0) to support your Ruby & RubyGems was 2.3.26. Try installing it with `gem install bundler -v 2.3.26`
	bundler requires Ruby version >= 2.6.0. The current ruby version is 2.4.10.364.


### Any other notes?

I know since I can reproduce locally, you say it's not a setup-ruby bug, but I think in this case, it is, since it seems setup-ruby is using the wrong command in that case.

Bundler 2.4.0 was just released, which has a minimum Ruby version of 2.6.

The default bundle installation command of `gem install bundler -v '~> 2.0'` doesn't work on those Ruby version because it seems `gem install` only uses the `~= 2.0` to pick the latest version, not necessarily one that is compatible with the current Ruby.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions