How can I use the Azure DevOps Pipeline with a specific older version of Ruby

0 votes

For a project I'm working on, Ruby 2.7.5 specifically needs to be used.

I attempted installing it using Azure's UseRubyVersion@0:

- task: UseRubyVersion@0
  inputs:
    versionSpec: "2.7.5"

But this resulted in an error:

##[warning]Specifying an exact version is not recommended on Microsoft-Hosted agents. Patch versions of Ruby can be replaced by new ones on Hosted agents without notice, which will cause builds to fail unexpectedly. It is recommended to specify only major or major and minor version (Example: `2` or `2.4`)
##[error]Version spec 2.7.5 for architecture %s did not match any version in Agent.ToolsDirectory.
Available versions: /Users/runner/hostedtoolcache
2.7.7,3.0.5,3.1.3

As you can see, Azure only offers minor version updates, so it is impossible to instal a specific version like 2.7.5.

Exists a different method for installing a particular Ruby version in an Azure DevOps pipeline?

Feb 7, 2023 in DevOps on Cloud by Damonlang
• 1,230 points

edited 4 days ago 93 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP