Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Ruby version ignored #32

Closed
fbjork opened this issue Sep 30, 2019 · 11 comments
Closed

Ruby version ignored #32

fbjork opened this issue Sep 30, 2019 · 11 comments
Labels
bug Something isn't working more-information-needed The issue is waiting on more information from the reporter.

Comments

@fbjork
Copy link

fbjork commented Sep 30, 2019

I have the following in my config, but the Ruby version defaults to 2.6.3
Any idea what's wrong?

      - name: Setup Ruby
        uses: actions/[email protected]
        with:
          ruby-version: '2.5.5'

This is the output:

Run actions/[email protected]
2
  with:
3
    ruby-version: 2.5.5
4
    version: >= 2.4
5
sudo ln -sf /opt/hostedtoolcache/Ruby/2.6.3/x64/bin/ruby /usr/bin/ruby
6
##[add-path]/opt/hostedtoolcache/Ruby/2.6.3/x64/bin
@bryanmacfarlane bryanmacfarlane added the bug Something isn't working label Jan 7, 2020
@eileencodes
Copy link
Contributor

Hey @fbjork are you still having this problem or has it been resolved?

@eileencodes eileencodes added the more-information-needed The issue is waiting on more information from the reporter. label Jan 9, 2020
@fbjork
Copy link
Author

fbjork commented Jan 10, 2020

I got past that error, but now I'm getting this error:

##[error]Version 2.5.7 not found

@MSP-Greg
Copy link
Contributor

The only Rubies available from the 'toolcache' are 2.4.6, 2.5.5, and 2.6.3.

The current 'setup-ruby' actions relies using Rubies on the disk image. This may change or be extended in the future.

Since Ruby binaries are relatively small, you can use https://github.com/eregon/use-ruby-action, which downloads and installs all Ruby standard releases from 2.3.0 forward.

@chrisseaton
Copy link

The only Rubies available from the 'toolcache' are 2.4.6, 2.5.5, and 2.6.3.

2.6.3 seems to have disappeared? How does this happen? The action is even versioned. How can it just stop working like this?

image

@MSP-Greg
Copy link
Contributor

They upgraded some Ruby versions. Maybe use the format '2.6.x'?

See https://github.com/MSP-Greg/github-actions-ruby-info/runs/393668457

At present, the versions are not aligned across OS's...

@chrisseaton
Copy link

Am I missing something fundamental here?

How can my workflow work with this action one day, and not the next, when I'm pinned to a major version of the action?

If they removed some versions why wasn't the major version bumped?

Does this not work like I think it works? How do I make a workflow that will work tomorrow as well as today?

@MSP-Greg
Copy link
Contributor

What was your ruby-version: string?

@chrisseaton
Copy link

It was specifically 2.6.3. I know that's pinned to a minor version. But what's wrong with that?

@MSP-Greg
Copy link
Contributor

teeny.

Anyway, nothing is wrong with that. I'm just the messenger...

@MSP-Greg
Copy link
Contributor

Ruby 2.7.0 is now installed

@bryanmacfarlane
Copy link
Member

The readme has been updated to clarify the virtual environments in the action hosted machines pools only maintain latest of each minor version.

actions/runner-images#281

This setup-action operates on the versions installed on the VM images. There is a proposal in ADR #49 discussing options to pull versions JIT but right now there's no official distributions of ruby. Options are being discussing in the VM issue and ADR.

For now, bind to minor.

Hope that helps. Apologies for your issues.

Closing but let me know if any of that is not clear.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working more-information-needed The issue is waiting on more information from the reporter.
Projects
None yet
Development

No branches or pull requests

5 participants