Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
69 lines (44 sloc) 2.31 KB
title description ms.prod ms.technology ms.assetid ms.manager ms.custom ms.author author ms.reviewer ms.date monikerRange
Use Ruby Version task
Select a version of Ruby to run on an agent and optionally add it to PATH
devops
devops-cicd
0b9f5626-08ec-45a3-8a39-aff5b3394398
madhurig
seodec18
dastahel
davidstaheli
lukillgo
12/07/2018
azure-devops

Use Ruby Version task

Azure Pipelines

Use this task in a build or release pipeline to select a version of Ruby to run on an agent, and optionally add it to PATH.

Demands

None

Prerequisites

  • A Microsoft-hosted agent with side-by-side versions of Ruby installed, or a self-hosted agent with Agent.ToolsDirectory configured (see Q&A).

This task will fail if no Ruby versions are found in Agent.ToolsDirectory. Available Ruby versions on Microsoft-hosted agents can be found here.

::: moniker range="> tfs-2018"

YAML snippet

[!INCLUDE temp]

::: moniker-end

Arguments

Argument Description
Version spec Version range or exact version of a Ruby version to use.
Add to PATH Whether to prepend the retrieved Ruby version to the PATH environment variable to make it available in subsequent tasks or scripts without using the output variable.

If the task completes successfully, the task's output variable will contain the directory of the Ruby installation.

Open source

This task is open source on GitHub. Feedback and contributions are welcome.

Q & A

Where can I learn more about tool installers?

For an explanation of tool installers and examples, see Tool installers.

[!INCLUDE temp]

How can I configure a self-hosted agent to use this task?

You can run this task on a self-hosted agent with your own Ruby versions. To run this task on a self-hosted agent, set up Agent.ToolsDirectory by following the instructions here. The tool name to use is "Ruby."

You can’t perform that action at this time.