Skip to content

Error: Cannot parse bundler input: 2.0.0.pre.3 #439

Closed
@dblock

Description

@dblock

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

- name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7
          bundler: '2.0.0.pre.3'
          bundler-cache: true

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

https://github.com/mongoid/mongoid-grid_fs/actions/runs/3851008682/jobs/6561766355

The command and output of the failing step

023-01-05T22:55:37.9400155Z ##[group]Run ruby/setup-ruby@v1
2023-01-05T22:55:37.9400373Z with:
2023-01-05T22:55:37.9400559Z   ruby-version: 2.7
2023-01-05T22:55:37.9400753Z   bundler: 2.0.0.pre.3
2023-01-05T22:55:37.9400948Z   bundler-cache: false
2023-01-05T22:55:37.9401130Z env:
2023-01-05T22:55:37.9401343Z   BUNDLE_GEMFILE: gemfiles/mongoid-5.0.gemfile
2023-01-05T22:55:37.9401579Z ##[endgroup]
2023-01-05T22:55:38.2131451Z ##[group]Modifying PATH
2023-01-05T22:55:38.2135635Z Entries added to PATH to use selected Ruby:
2023-01-05T22:55:38.2138503Z   /opt/hostedtoolcache/Ruby/2.7.7/x64/bin
2023-01-05T22:55:38.2138936Z ##[endgroup]
2023-01-05T22:55:38.2164962Z ##[group]Downloading Ruby
2023-01-05T22:55:38.2167778Z https://github.com/ruby/ruby-builder/releases/download/toolcache/ruby-2.7.7-ubuntu-22.04.tar.gz
2023-01-05T22:55:38.4632093Z Took   0.25 seconds
2023-01-05T22:55:38.4635723Z ##[endgroup]
2023-01-05T22:55:38.4638863Z ##[group]Extracting  Ruby
2023-01-05T22:55:38.4673442Z [command]/usr/bin/tar -xz -C /opt/hostedtoolcache/Ruby/2.7.7 -f /home/runner/work/_temp/25c2651e-0063-4bbd-9f6c-eacac961f549
2023-01-05T22:55:38.8310920Z Took   0.37 seconds
2023-01-05T22:55:38.8311858Z ##[endgroup]
2023-01-05T22:55:38.8312813Z ##[group]Print Ruby version
2023-01-05T22:55:38.8326720Z [command]/opt/hostedtoolcache/Ruby/2.7.7/x64/bin/ruby --version
2023-01-05T22:55:38.8497100Z ruby 2.7.7p221 (2022-11-24 revision 168ec2b1e5) [x86_64-linux]
2023-01-05T22:55:38.8510830Z Took   0.02 seconds
2023-01-05T22:55:38.8511566Z ##[endgroup]
2023-01-05T22:55:38.8513043Z ##[group]Installing Bundler
2023-01-05T22:55:38.8519758Z Took   0.00 seconds
2023-01-05T22:55:38.8520312Z ##[endgroup]
2023-01-05T22:55:38.8604597Z ##[error]Error: Cannot parse bundler input: 2.0.0.pre.3
    at Module.installBundler (/home/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:121:11)
    at /home/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:68814:15
    at body (/home/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:327:20)
    at Object.<anonymous> (/home/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:4059:28)
    at Generator.next (<anonymous>)
    at /home/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:3810:71
    at new Promise (<anonymous>)
    at __webpack_modules__.2186.__awaiter (/home/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:3806:12)
    at Object.group (/home/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:4055:12)
    at Module.measure (/home/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:342:25)
2023-01-05T22:55:38.8697985Z Post job cleanup.

Any other notes?

Looks like any pre version fails to parse. It's a valid version of bundler, which is < 2 but bigger than > 1.x so it's why it was being used used here as some workaround. It's NBD for our project, but still seems like a valid bug for ruby-setup.

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