acraven / azure-dependabot

Companion to Updating dependencies in Azure DevOps repos
58 stars 17 forks source link

Ruby version 2.6.2 not contained in Agent.ToolsDirectory #1

Open dghweist opened 4 years ago

dghweist commented 4 years ago

Hi, thank you very much for your work!

When I try to execute my build pipeline in Azure DevOps, I get the following error:

[section]Starting: UseRubyVersion

============================================================================== Task : Use Ruby version Description : Use the specified version of Ruby from the tool cache, optionally adding it to the PATH Version : 0.151.2 Author : Microsoft Corporation Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/tool/use-ruby-version

[error]Version spec =2.6.2 for architecture %s did not match any version in Agent.ToolsDirectory.

Available versions: /opt/hostedtoolcache 2.3.7,2.4.6,2.5.5,2.6.3 If this is a Microsoft-hosted agent, check that this image supports side-by-side versions of Ruby at https://aka.ms/hosted-agent-software. If this is a self-hosted agent, see how to configure side-by-side Ruby versions at https://go.microsoft.com/fwlink/?linkid=2005989.

[section]Finishing: UseRubyVersion

It seems that the ruby version is not in the Microsoft-hosted agent that is used here. When I try to change the ruby version within the code, I get further errors. How can I fix this? Thank you very much!

RobinDink commented 4 years ago

Hey,

as you can see here, Ruby 2.6.2 is not available on the Ubuntu hosted agent.

I just updated the Ruby version to 2.6.3 in both the azure-pipelines-yaml and the Gemfile and it works for me.

Cheers, Robin

Bertk commented 4 years ago

The ubuntu-latest agent now has now support for

Ruby:
    Ruby 2.4.9
    Ruby 2.5.7
    Ruby 2.6.5
    Ruby 2.7.0

and this works with gem "dependabot-omnibus", "~> 0.116.4"

Cheers Bert