From 79e8d1be9982366b07f73004e87f4db5eb786244 Mon Sep 17 00:00:00 2001 From: Maksim Petrov Date: Thu, 16 Apr 2020 22:12:19 +0300 Subject: [PATCH] Fix gem update for default ruby --- images/win/scripts/Installers/Download-ToolCache.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Download-ToolCache.ps1 b/images/win/scripts/Installers/Download-ToolCache.ps1 index cc42e97e..4749a3f3 100644 --- a/images/win/scripts/Installers/Download-ToolCache.ps1 +++ b/images/win/scripts/Installers/Download-ToolCache.ps1 @@ -71,8 +71,10 @@ Function Set-DefaultRubyVersion { Write-Host "Use Ruby ${Version} as a system Ruby" Add-MachinePathItem -PathItem $rubyDir.FullName + $env:Path = Get-MachinePath + # Update ruby gem to latest version - gem update --system + Invoke-Expression "gem update --system" } Import-Module -Name ImageHelpers -Force