actions / runner-images

GitHub Actions runner images
MIT License
10.23k stars 3.08k forks source link

Using the Ruby version 3.1.5 on Windows-2019 Agent failure #9999

Closed djaus2 closed 5 months ago

djaus2 commented 5 months ago

Description

Using Azure Pipeline to build and publish a Jekyll site using Hosted Agent, was previously using Ruby 3.1.4. Recently the Ruby version with the Windows 2019 Hosted Agent was changed to V 3.1.5 this caused an error on the Ruby version check. When adjusted for 3.1.5 the site build fails. There is detailed discussion of this on StackOverflow with some possible workarounds. azure-devops-jekyll-site-build-fails-worked-previously. Only changing to Ubutu, the third method, worked for me. There is a failure to load an existing file in the build

Platforms affected

Runner images affected

Image version and build link

https://dev.azure.com/SportronicsAu/Gems

Is it regression?

No

Expected behavior

Expect the site build step to work.

Actual behavior

Build fails as follows:

Starting: Build
==============================================================================
Task         : Command line
Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version      : 2.237.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
==============================================================================
Generating script.
Script contents: shell
bundle exec jekyll build
========================== Starting Command Output ===========================
"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a\_temp\9815d7ee-08b2-4491-934a-b1fb6ffcea97.cmd""
C:/hostedtoolcache/windows/Ruby/3.1.5/x64/lib/ruby/3.1.0/csv/parser.rb:3:in `require': 126: The specified module could not be found.   - C:/hostedtoolcache/windows/Ruby/3.1.5/x64/lib/ruby/gems/3.1.0/gems/strscan-3.1.0/lib/strscan.so (LoadError)
    from C:/hostedtoolcache/windows/Ruby/3.1.5/x64/lib/ruby/3.1.0/csv/parser.rb:3:in `<top (required)>'
    from C:/hostedtoolcache/windows/Ruby/3.1.5/x64/lib/ruby/3.1.0/csv.rb:98:in `require_relative'
    from C:/hostedtoolcache/windows/Ruby/3.1.5/x64/lib/ruby/3.1.0/csv.rb:98:in `<top (required)>'
    from C:/hostedtoolcache/windows/Ruby/3.1.5/x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.3/lib/jekyll.rb:28:in `require'
    from C:/hostedtoolcache/windows/Ruby/3.1.5/x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.3/lib/jekyll.rb:28:in `<top (required)>'
    from C:/hostedtoolcache/windows/Ruby/3.1.5/x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.3/exe/jekyll:8:in `require'
    from C:/hostedtoolcache/windows/Ruby/3.1.5/x64/lib/ruby/gems/3.1.0/gems/jekyll-4.3.3/exe/jekyll:8:in `<top (required)>'
    from C:/hostedtoolcache/windows/Ruby/3.1.5/x64/bin/jekyll:32:in `load'
    from C:/hostedtoolcache/windows/Ruby/3.1.5/x64/bin/jekyll:32:in `<main>'
##[error]Cmd.exe exited with code '1'.
Finishing: Build

the file strscan.so does exist in the folder indicated

Repro steps

djaus2 commented 5 months ago

Detailed discussion on StackOverflow here:

https://stackoverflow.com/questions/78566372/azure-devops-jekyll-site-build-fails-worked-previously

vidyasagarnimmagaddi commented 5 months ago

Hi @djaus2 , could you please provide the repro steps

kishorekumar-anchala commented 5 months ago

Hi @djaus2 ,

the main cause of the issue is dependencies as shown in the snippet. try to install all required dependencies .

the above snippet will help you download all required dependencies.

djaus2 commented 5 months ago

I already have:

From: kishorekumar-anchala @.> Sent: Wednesday, June 5, 2024 5:12 PM To: actions/runner-images @.> Cc: David Jones (MVP) @.>; Mention @.> Subject: Re: [actions/runner-images] Using the Ruby version 3.1.5 on Windows-2019 Agent failure (Issue #9999)

Hi @djaus2https://github.com/djaus2 ,

the main cause of the issue is dependencies as shown in the snippet. try to install all required dependencies .

the above snippet will help you download all required dependencies.

— Reply to this email directly, view it on GitHubhttps://github.com/actions/runner-images/issues/9999#issuecomment-2150106659, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7U2EKZ2STTANXNBEPNXH3ZF4MCNAVCNFSM6AAAAABI2LY5XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJQGEYDMNRVHE. You are receiving this because you were mentioned.Message ID: @.**@.>>

djaus2 commented 5 months ago

Here is the yaml from the pipeline:

pool: name: Azure Pipelines steps:

From: vidyasagarnimmagaddi @.> Sent: Wednesday, June 5, 2024 4:27 PM To: actions/runner-images @.> Cc: David Jones (MVP) @.>; Mention @.> Subject: Re: [actions/runner-images] Using the Ruby version 3.1.5 on Windows-2019 Agent failure (Issue #9999)

Hi @djaus2https://github.com/djaus2 , could you please provide the repro steps

— Reply to this email directly, view it on GitHubhttps://github.com/actions/runner-images/issues/9999#issuecomment-2149921182, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7U2EOOQ4RYXC3UO5H7PO3ZF4G3VAVCNFSM6AAAAABI2LY5XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBZHEZDCMJYGI. You are receiving this because you were mentioned.Message ID: @.**@.>>

kishorekumar-anchala commented 5 months ago

Hi @djaus2 ,

i have made some modifications to your pipeline, please try use below snippet .

1) it will download the latest version from the agent 2) we have install the bundle and jerkyll where Gemfile is available ( By default it is Buiild.SourceDirectory) 3) make sure all required library packages are mention in the gemfile

pool: vmImage: windows-2019

steps:

if any questions on the same revert back to us , we are happy to assist you .

djaus2 commented 5 months ago

Ok thanks. I will try that tonight, here in Estonia. I do appreciate the help. David Jones (MVP) From Australia

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: kishorekumar-anchala @.> Sent: Thursday, June 6, 2024 7:13:09 AM To: actions/runner-images @.> Cc: David Jones (MVP) @.>; Mention @.> Subject: Re: [actions/runner-images] Using the Ruby version 3.1.5 on Windows-2019 Agent failure (Issue #9999)

Hi @djaus2https://github.com/djaus2 ,

i have made some modifications to your pipeline, please try use below snippet .

  1. it will download the latest version from the agent **2) we have install the bundle and jerkyll where Gemfile is available ( By default it is Buiild.SourceDirectory)
  2. make sure all required library packages are mention in the gemfile**

pool: vmImage: windows-2019

steps:

if any questions on the same revert back to us , we are happy to assist you .

— Reply to this email directly, view it on GitHubhttps://github.com/actions/runner-images/issues/9999#issuecomment-2151376525, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7U2ENYK4PMLPQ32MJKGETZF7OVLAVCNFSM6AAAAABI2LY5XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJRGM3TMNJSGU. You are receiving this because you were mentioned.Message ID: @.***>

djaus2 commented 5 months ago

Just tried this: pool: name: Azure Pipelines steps:

Fails in the Install Gems step: C:/hostedtoolcache/windows/Ruby/3.0.7/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/worker.rb:57:in block in process_queue' C:/hostedtoolcache/windows/Ruby/3.0.7/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/worker.rb:54:in loop' C:/hostedtoolcache/windows/Ruby/3.0.7/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/worker.rb:54:in process_queue' C:/hostedtoolcache/windows/Ruby/3.0.7/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/worker.rb:90:in block (2 levels) in create_threads' An error occurred while installing wdm (0.1.1), and Bundler cannot continue. Looks like its still stuck on Ruby 3.0.7

Thx again

From: kishorekumar-anchala @.> Sent: Thursday, June 6, 2024 7:13 AM To: actions/runner-images @.> Cc: David Jones (MVP) @.>; Mention @.> Subject: Re: [actions/runner-images] Using the Ruby version 3.1.5 on Windows-2019 Agent failure (Issue #9999)

Hi @djaus2https://github.com/djaus2 ,

i have made some modifications to your pipeline, please try use below snippet .

  1. it will download the latest version from the agent **2) we have install the bundle and jerkyll where Gemfile is available ( By default it is Buiild.SourceDirectory)
  2. make sure all required library packages are mention in the gemfile**

pool: vmImage: windows-2019

steps:

if any questions on the same revert back to us , we are happy to assist you .

— Reply to this email directly, view it on GitHubhttps://github.com/actions/runner-images/issues/9999#issuecomment-2151376525, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7U2ENYK4PMLPQ32MJKGETZF7OVLAVCNFSM6AAAAABI2LY5XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJRGM3TMNJSGU. You are receiving this because you were mentioned.Message ID: @.**@.>>

djaus2 commented 5 months ago

My GemFile source https://rubygems.org

Hello! This is where you manage which Jekyll version is used to run.

When you want to use a different version, change it below, save the

file and run bundle install. Run Jekyll with bundle exec, like so:

#

bundle exec jekyll serve

#

This will help ensure the proper Jekyll version is running.

Happy Jekylling!

gem "jekyll", "~> 4.3.3"

This is the default theme for new Jekyll sites. You may change this to anything you like.

gem "minima", "~> 2.5"

If you want to use GitHub Pages, remove the "gem "jekyll"" above and

uncomment the line below. To upgrade, run bundle update github-pages.

gem "github-pages", group: :jekyll_plugins

If you have any plugins, put them here!

group :jekyll_plugins do gem "jekyll-feed", "~> 0.12" end

Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem

and associated library.

platforms :mingw, :x64_mingw, :mswin, :jruby do gem "tzinfo", ">= 1", "< 3" gem "tzinfo-data" end

Performance-booster for watching directories on Windows

gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

Lock http_parser.rb gem to v0.6.x on JRuby builds since newer versions of the gem

do not have a Java counterpart.

gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

From: kishorekumar-anchala @.> Sent: Thursday, June 6, 2024 7:13 AM To: actions/runner-images @.> Cc: David Jones (MVP) @.>; Mention @.> Subject: Re: [actions/runner-images] Using the Ruby version 3.1.5 on Windows-2019 Agent failure (Issue #9999)

Hi @djaus2https://github.com/djaus2 ,

i have made some modifications to your pipeline, please try use below snippet .

  1. it will download the latest version from the agent **2) we have install the bundle and jerkyll where Gemfile is available ( By default it is Buiild.SourceDirectory)
  2. make sure all required library packages are mention in the gemfile**

pool: vmImage: windows-2019

steps:

if any questions on the same revert back to us , we are happy to assist you .

— Reply to this email directly, view it on GitHubhttps://github.com/actions/runner-images/issues/9999#issuecomment-2151376525, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7U2ENYK4PMLPQ32MJKGETZF7OVLAVCNFSM6AAAAABI2LY5XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJRGM3TMNJSGU. You are receiving this because you were mentioned.Message ID: @.**@.>>

djaus2 commented 5 months ago

Earlier in the Gems Install step: Fetching jekyll-seo-tag 2.8.0 Installing jekyll-seo-tag 2.8.0 Fetching minima 2.5.1 Installing minima 2.5.1 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: C:/hostedtoolcache/windows/Ruby/3.0.7/x64/lib/ruby/gems/3.0.0/gems/wdm-0.1.1/ext/wdm C:/hostedtoolcache/windows/Ruby/3.0.7/x64/bin/ruby.exe -I

From: David Jones (MVP) Sent: Thursday, June 6, 2024 7:43 PM To: actions/runner-images @.>; actions/runner-images @.> Cc: Mention @.***> Subject: RE: [actions/runner-images] Using the Ruby version 3.1.5 on Windows-2019 Agent failure (Issue #9999)

Just tried this: pool: name: Azure Pipelines steps:

Fails in the Install Gems step: C:/hostedtoolcache/windows/Ruby/3.0.7/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/worker.rb:57:in block in process_queue' C:/hostedtoolcache/windows/Ruby/3.0.7/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/worker.rb:54:in loop' C:/hostedtoolcache/windows/Ruby/3.0.7/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/worker.rb:54:in process_queue' C:/hostedtoolcache/windows/Ruby/3.0.7/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/worker.rb:90:in block (2 levels) in create_threads' An error occurred while installing wdm (0.1.1), and Bundler cannot continue. Looks like its still stuck on Ruby 3.0.7

Thx again

From: kishorekumar-anchala @.**@.>> Sent: Thursday, June 6, 2024 7:13 AM To: actions/runner-images @.**@.>> Cc: David Jones (MVP) @.**@.>>; Mention @.**@.>> Subject: Re: [actions/runner-images] Using the Ruby version 3.1.5 on Windows-2019 Agent failure (Issue #9999)

Hi @djaus2https://github.com/djaus2 ,

i have made some modifications to your pipeline, please try use below snippet .

  1. it will download the latest version from the agent **2) we have install the bundle and jerkyll where Gemfile is available ( By default it is Buiild.SourceDirectory)
  2. make sure all required library packages are mention in the gemfile**

pool: vmImage: windows-2019

steps:

if any questions on the same revert back to us , we are happy to assist you .

— Reply to this email directly, view it on GitHubhttps://github.com/actions/runner-images/issues/9999#issuecomment-2151376525, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7U2ENYK4PMLPQ32MJKGETZF7OVLAVCNFSM6AAAAABI2LY5XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJRGM3TMNJSGU. You are receiving this because you were mentioned.Message ID: @.**@.>>

djaus2 commented 5 months ago

Just did a check cd $(Build.SourcesDirectory) doesn’t change directory

From: kishorekumar-anchala @.> Sent: Thursday, June 6, 2024 7:13 AM To: actions/runner-images @.> Cc: David Jones (MVP) @.>; Mention @.> Subject: Re: [actions/runner-images] Using the Ruby version 3.1.5 on Windows-2019 Agent failure (Issue #9999)

Hi @djaus2https://github.com/djaus2 ,

i have made some modifications to your pipeline, please try use below snippet .

  1. it will download the latest version from the agent **2) we have install the bundle and jerkyll where Gemfile is available ( By default it is Buiild.SourceDirectory)
  2. make sure all required library packages are mention in the gemfile**

pool: vmImage: windows-2019

steps:

if any questions on the same revert back to us , we are happy to assist you .

— Reply to this email directly, view it on GitHubhttps://github.com/actions/runner-images/issues/9999#issuecomment-2151376525, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7U2ENYK4PMLPQ32MJKGETZF7OVLAVCNFSM6AAAAABI2LY5XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJRGM3TMNJSGU. You are receiving this because you were mentioned.Message ID: @.**@.>>

kishorekumar-anchala commented 5 months ago

@djaus2 ,

You're using the ruby version vRuby/3.0.7/ , But you're installing the different version at runtime (3.1.5) . kindly try to understand the error .

1) Either Upgrade your ruby code to latest or install the required version available in your developed script. 2) execute install/execute command where Gemfile is located .( You can give direct value instead of default parameter if you're not aware of them ex: ./folder/Gemfile)

you can observe this step once this step got succeeded to identify the folder where gemfile is located .

djaus2 commented 5 months ago

So but I don't understand your last email. I thought doing the choco install is enough to force the ruby version ....

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: kishorekumar-anchala @.> Sent: Friday, June 7, 2024 7:25:53 AM To: actions/runner-images @.> Cc: David Jones (MVP) @.>; Mention @.> Subject: Re: [actions/runner-images] Using the Ruby version 3.1.5 on Windows-2019 Agent failure (Issue #9999)

@djaus2https://github.com/djaus2 ,

You're using the ruby version vRuby/3.0.7/ , But you're installing the different version at runtime (3.1.5) . kindly try to understand the error .

  1. Either Upgrade your ruby code to latest or install the required version available in your developed script.
  2. execute install/execute command where Gemfile is located .( You can give direct value instead of default parameter if you're not aware of them ex: ./folder/Gemfile)

    • script: | dir $(Build.SourcesDirectory)

you can observe this step once this step got succeeded to identify the folder where gemfile is located .

— Reply to this email directly, view it on GitHubhttps://github.com/actions/runner-images/issues/9999#issuecomment-2153908068, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7U2EMC3AZC6B2RGIXECSTZGEY5DAVCNFSM6AAAAABI2LY5XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJTHEYDQMBWHA. You are receiving this because you were mentioned.Message ID: @.***>

kishorekumar-anchala commented 5 months ago

So but I don't understand your last email. I thought doing the choco install is enough to force the ruby version .... Get Outlook for Androidhttps://aka.ms/AAb9ysg ____ From: kishorekumar-anchala @.> Sent: Friday, June 7, 2024 7:25:53 AM To: actions/runner-images @.> Cc: David Jones (MVP) @.>; Mention @.> Subject: Re: [actions/runner-images] Using the Ruby version 3.1.5 on Windows-2019 Agent failure (Issue #9999) @djaus2https://github.com/djaus2 , You're using the ruby version vRuby/3.0.7/ , But you're installing the different version at runtime (3.1.5) . kindly try to understand the error . 1. Either Upgrade your ruby code to latest or install the required version available in your developed script. 2. execute install/execute command where Gemfile is located .( You can give direct value instead of default parameter if you're not aware of them ex: ./folder/Gemfile) * script: | dir $(Build.SourcesDirectory) you can observe this step once this step got succeeded to identify the folder where gemfile is located . — Reply to this email directly, view it on GitHub<#9999 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7U2EMC3AZC6B2RGIXECSTZGEY5DAVCNFSM6AAAAABI2LY5XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJTHEYDQMBWHA. You are receiving this because you were mentioned.Message ID: @.***>

Yes, Correct.

but remaining steps are useful if some dependencies missing .

djaus2 commented 5 months ago

I appreciate your help on this.

As I see it:

Will work on the Windows pipeline and appreciate any further input you have.

I do now have a fix in the short term:

Site deployed site is https://djzblogcdnenpointweb2.azureedge.net/ When eventually filters its way to my custom site: https://davidjones.sportronics.com.au

From: kishorekumar-anchala @.> Sent: Friday, June 7, 2024 11:51 AM To: actions/runner-images @.> Cc: David Jones (MVP) @.>; Mention @.> Subject: Re: [actions/runner-images] Using the Ruby version 3.1.5 on Windows-2019 Agent failure (Issue #9999)

So but I don't understand your last email. I thought doing the choco install is enough to force the ruby version .... Get Outlook for Androidhttps://aka.ms/AAb9ysg … ____ From: kishorekumar-anchala @.> Sent: Friday, June 7, 2024 7:25:53 AM To: actions/runner-images @.> Cc: David Jones (MVP) @.>; Mention @.> Subject: Re: [actions/runner-images] Using the Ruby version 3.1.5 on Windows-2019 Agent failure (Issue #9999https://github.com/actions/runner-images/issues/9999) @djaus2https://github.com/djaus2https://github.com/djaus2 , You're using the ruby version vRuby/3.0.7/ , But you're installing the different version at runtime (3.1.5) . kindly try to understand the error . 1. Either Upgrade your ruby code to latest or install the required version available in your developed script. 2. execute install/execute command where Gemfile is located .( You can give direct value instead of default parameter if you're not aware of them ex: ./folder/Gemfile) * script: | dir $(Build.SourcesDirectory) you can observe this step once this step got succeeded to identify the folder where gemfile is located . — Reply to this email directly, view it on GitHub<#9999 (comment)https://github.com/actions/runner-images/issues/9999#issuecomment-2153908068>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7U2EMC3AZC6B2RGIXECSTZGEY5DAVCNFSM6AAAAABI2LY5XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJTHEYDQMBWHA. You are receiving this because you were mentioned.Message ID: @.***>

Yes, Correct.

but remaining steps are useful if some dependencies missing .

— Reply to this email directly, view it on GitHubhttps://github.com/actions/runner-images/issues/9999#issuecomment-2154388591, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7U2ENLTXVWTAR7TCHRYF3ZGFYANAVCNFSM6AAAAABI2LY5XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJUGM4DQNJZGE. You are receiving this because you were mentioned.Message ID: @.**@.>>

djaus2 commented 5 months ago

I have posted a detailed blog on this: Azure Pipelines: Jekyll Site Build failure

vidyasagarnimmagaddi commented 5 months ago

hi @djaus2 , Hope your issue has been resolved, Kindly confirm the same

djaus2 commented 5 months ago

Although I have found an "external" workaround, building the site locally, my Azure Pipeline Build remains broken.

Changing the Ruby specification or using choco to install a Ruby version still causes failures in the Build pipeline.

Also, is there a way to get automated notifications of Azure Host Agent changes?

Thx again for your help.

David Jones(MVP)

— Reply to this email directly, view it on GitHubhttps://github.com/actions/runner-images/issues/9999#issuecomment-2157318116, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7U2EMUKCAR3EWIQJM6DODZGU4YZAVCNFSM6AAAAABI2LY5XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJXGMYTQMJRGY. You are receiving this because you were mentioned.Message ID: @.***>

djaus2 commented 5 months ago

Although I have found an "external" workaround, building the site locally, my Azure Pipeline Build remains broken. 

Changing the Ruby specification or using choco to install a Ruby version still causes failures in the Build pipeline.

Also, is there a way to get automated notifications of Azure Host Agent changes?

Thx again for your help.

David Jones(MVP)

djaus2 commented 5 months ago

Devops Build 10 May 2024 OK Ruby V3.1.4.txt Devops Build 02 June 2024 NOK Ruby gt 3.0.txt

This is two pipeline builds for comparison.

On a side by side comparison ( I use BeyondCompare) apart from date/time on each line, ignored:

djaus2 commented 5 months ago

image

The Install Gems comparison

kishorekumar-anchala commented 5 months ago

@djaus2 .

Also, is there a way to get automated notifications of Azure Host Agent changes?

Azure Monitor

As mentioned earlier , the issue with with version compatibilities, Could you please look into them .

example : C:/hostedtoolcache/windows/Ruby/3.0.7/x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/worker.rb:57:in block in process_queue'`

here the ruby version is 3.0.7 , gems version 3.0.0 and bundler version 2.5.11

when we look into the first error which you posted at very beginning , it having different versions .

C:/hostedtoolcache/windows/Ruby/3.1.5/x64/lib/ruby/3.1.0/csv/parser.rb:3:inrequire': 126: The specified module could not be found. - C:/hostedtoolcache/windows/Ruby/3.1.5/x64/lib/ruby/gems/3.1.0/gems/strscan-3.1.0/lib/strscan.so (LoadError)`

Here , ruby version is 3.1.5 , gems version 3.1.0 .

Could you please install appropriate versions of ruby and its dependencies according to your project .

win 19 and 22 runner images has below versions :

Ruby

3.0.7 3.1.6

RubyGems 3.2.33

if you face any issue , feel free to revert us . we are happy to assist . Thankyou !

shamil-mubarakshin commented 5 months ago

Hey @djaus2, Ruby on images is installed using oneclick/rubyinstaller2, copy and unzip basically. I have tested your code using Ruby versions 3.1.4, 3.1.5, 3.1.6 and issue is reproduced in all of them. The failure timing is partially related to rexml gem update from 3.2.6 to 3.2.8, which introduced strscan dependency. So far I couldn't determine if this behavior is image related or some external. Only remotely related issue I managed to find is https://github.com/rubygems/rubygems/issues/7726. As a workaround adding following steps to Azure DevOps pipeline on windows-2019 right after UseRubyVersion@0 task worked. Older versions of both strscan and bigdecimal gems are present as default in Ruby installation, but folders are empty for some reason.

    - script: |
        gem install --default strscan

    - script: |
        gem install --default bigdecimal
djaus2 commented 5 months ago

Thanks @kishorekumar-anchala Thanks will look into those points. Thanks @shamil-mubarakshin. thanks, will try that.


Update: I have a pipeline working sortof.

pool: vmImage: ubuntu-latest


- Also, whilst the release pipeline works it also has to be manually triggered.
djaus2 commented 5 months ago

@shamil-mubarakshin Tried your suggestion: (1) This worked with my "scratch" application as referred to above. It only has the Build pipeline, no release. It is a simple Jekyll app. Thanks

(2) With my blog site: All good up to build. Got same build eror as origiinal in Build step:

C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/csv/parser.rb:3:in `require': 126:
 The specified module could not be found.   
- C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/strscan-3.1.0/lib/strscan.so (LoadError)

NB: Travelling for a week or so will try to resolve (2) then. Thanks for the help for both of you. :)

vidyasagarnimmagaddi commented 5 months ago

Hi @djaus2 , Kindly try to resolve, Closing this issue, Thanks

djaus2 commented 5 months ago

As previously stated, the assistance here has enabled getting the scratch Jekyll site build working. Thx Still getting same error in Build step with my more complex blog site wrt "strscan.so (LoadError)" though as below

The commands used as pipeline steps

Ruby >=2.14
gem install --default strscan
gem install --default bigdecimal
gem install jekyll bundler
cd $(Build.SourcesDirectory)
bundle install
cd $(Build.SourcesDirectory)
bundle exec jekyll build

More detail with logs

Use Ruby

= 2.4

gem install --default strscan

Script:

gem install --default strscan

gem install --default strscan
========================== Starting Command Output ===========================
"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a\_temp\4a73a9d7-daa9-454d-8243-824bdfbbce27.cmd""
Temporarily enhancing PATH for MSYS/MINGW...
Successfully installed strscan-3.1.0 as a default gem
Done installing documentation for strscan after 0 seconds
1 gem installed
Finishing: gem install --default strscan

gem install --default bigdecimal

Script: gem install --default bigdecimal

Install Jekyll and bundler Script: Install Jekyll and bundler

Install Gems

Script: cd $(Build.SourcesDirectory) bundle install

...
...
Installing strscan 3.1.0 with native extensions
Installing bigdecimal 3.1.8 with native extensions
...
...

Build

Script: cd $(Build.SourcesDirectory) bundle exec jekyll build

C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/csv/parser.rb:3:in `require': 126:   
The specified module could not be found.   
- C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/strscan-3.1.0/lib/strscan.so (LoadError)
rosslyn-beckynorville commented 5 months ago

Hello, I have been having very similar issues with strscan gem for Ruby for several weeks on both Win 2022 and Win 2019 agents. Note: I am running Rspec tests with selenium-webdriver gem, I am using Release pipelines not Build pipelines.

While running with Win 2019, the dependency on strscan is within the httpx gem. This gem installs without error and the files begin to load before failing with the following:

2024-06-24T13:21:58.5138407Z Failure/Error: require 'httpx' 2024-06-24T13:21:58.5138578Z 2024-06-24T13:21:58.5138849Z LoadError: 2024-06-24T13:21:58.5139217Z 126: The specified module could not be found. - C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/strscan-3.1.0/lib/strscan.so 2024-06-24T13:21:58.5140938Z # ------------------ 2024-06-24T13:21:58.5141318Z # --- Caused by: --- 2024-06-24T13:21:58.5141629Z # LoadError: 2024-06-24T13:21:58.5141917Z # cannot load such file -- httpx

Using Win 2022, the error is thrown much earlier in the process while installing gems, the dependency on strscan is rexml for selenium-webdriver and selenium-devtools.

2024-06-24T13:22:40.7284401Z Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 2024-06-24T13:22:40.7284847Z 2024-06-24T13:22:40.7285137Z current directory: 2024-06-24T13:22:40.7285866Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/strscan-3.1.0/ext/strscan 2024-06-24T13:22:40.7286210Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/bin/ruby.exe -I 2024-06-24T13:22:40.7286520Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0 extconf.rb 2024-06-24T13:22:40.7286799Z checking for onig_region_memsize() in ruby.h... yes 2024-06-24T13:22:40.7288327Z checking for rb_reg_onig_match() in ruby.h... no 2024-06-24T13:22:40.7288610Z creating Makefile 2024-06-24T13:22:40.7288785Z 2024-06-24T13:22:40.7288983Z current directory: 2024-06-24T13:22:40.7289448Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/strscan-3.1.0/ext/strscan 2024-06-24T13:22:40.7289867Z make DESTDIR\= sitearchdir\=./.gem.20240624-3856-b0f28y 2024-06-24T13:22:40.7290216Z sitelibdir\=./.gem.20240624-3856-b0f28y clean 2024-06-24T13:22:40.7290404Z 2024-06-24T13:22:40.7290601Z current directory: 2024-06-24T13:22:40.7290984Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/strscan-3.1.0/ext/strscan 2024-06-24T13:22:40.7291408Z make DESTDIR\= sitearchdir\=./.gem.20240624-3856-b0f28y 2024-06-24T13:22:40.7291739Z sitelibdir\=./.gem.20240624-3856-b0f28y 2024-06-24T13:22:40.7292088Z generating strscan-x64-mingw-ucrt.def 2024-06-24T13:22:40.7292331Z make: *** No rule to make target 2024-06-24T13:22:40.7292725Z '/C/hostedtoolcache/windows/Ruby/3.1.6/x64/include/ruby-3.1.0/ruby.h', needed by 2024-06-24T13:22:40.7293033Z 'strscan.o'. Stop. 2024-06-24T13:22:40.7293182Z 2024-06-24T13:22:40.7293400Z make failed, exit code 2 2024-06-24T13:22:40.7293551Z 2024-06-24T13:22:40.7293760Z Gem files will remain installed in 2024-06-24T13:22:40.7294156Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/strscan-3.1.0 2024-06-24T13:22:40.7294417Z for inspection. 2024-06-24T13:22:40.7294648Z Results logged to 2024-06-24T13:22:40.7295071Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/strscan-3.1.0/gem_make.out 2024-06-24T13:22:40.7295324Z 2024-06-24T13:22:40.7295643Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/ext/builder.rb:102:in 2024-06-24T13:22:40.7296104Z run' 2024-06-24T13:22:40.7296378Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/ext/builder.rb:51:in 2024-06-24T13:22:40.7296669Zblock in make' 2024-06-24T13:22:40.7296945Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/ext/builder.rb:43:in 2024-06-24T13:22:40.7297225Z each' 2024-06-24T13:22:40.7297489Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/ext/builder.rb:43:in 2024-06-24T13:22:40.7297745Zmake' 2024-06-24T13:22:40.7298044Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:42:in 2024-06-24T13:22:40.7298309Z build' 2024-06-24T13:22:40.7298599Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/ext/builder.rb:171:in 2024-06-24T13:22:40.7298867Zbuild_extension' 2024-06-24T13:22:40.7299164Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/ext/builder.rb:205:in 2024-06-24T13:22:40.7299442Z block in build_extensions' 2024-06-24T13:22:40.7299745Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/ext/builder.rb:202:in 2024-06-24T13:22:40.7300005Zeach' 2024-06-24T13:22:40.7300268Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/ext/builder.rb:202:in 2024-06-24T13:22:40.7300562Z build_extensions' 2024-06-24T13:22:40.7300833Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/installer.rb:843:in 2024-06-24T13:22:40.7301125Zbuild_extensions' 2024-06-24T13:22:40.7301562Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.11/lib/bundler/rubygems_gem_installer.rb:76:in 2024-06-24T13:22:40.7301891Z build_extensions' 2024-06-24T13:22:40.7302325Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.11/lib/bundler/rubygems_gem_installer.rb:28:in 2024-06-24T13:22:40.7302641Zinstall' 2024-06-24T13:22:40.7303056Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.11/lib/bundler/source/rubygems.rb:206:in 2024-06-24T13:22:40.7303370Z install' 2024-06-24T13:22:40.7303822Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.11/lib/bundler/installer/gem_installer.rb:54:in 2024-06-24T13:22:40.7304617Zinstall' 2024-06-24T13:22:40.7305054Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.11/lib/bundler/installer/gem_installer.rb:16:in 2024-06-24T13:22:40.7305380Z install_from_spec' 2024-06-24T13:22:40.7305824Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.11/lib/bundler/installer/parallel_installer.rb:132:in 2024-06-24T13:22:40.7306176Zdo_install' 2024-06-24T13:22:40.7306640Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.11/lib/bundler/installer/parallel_installer.rb:123:in 2024-06-24T13:22:40.7306955Z block in worker_pool' 2024-06-24T13:22:40.7307405Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.11/lib/bundler/worker.rb:62:in 2024-06-24T13:22:40.7307687Zapply_func' 2024-06-24T13:22:40.7308117Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.11/lib/bundler/worker.rb:57:in 2024-06-24T13:22:40.7308413Z block in process_queue' 2024-06-24T13:22:40.7308837Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.11/lib/bundler/worker.rb:54:in 2024-06-24T13:22:40.7309113Zloop' 2024-06-24T13:22:40.7309528Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.11/lib/bundler/worker.rb:54:in 2024-06-24T13:22:40.7309813Z process_queue' 2024-06-24T13:22:40.7310214Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.11/lib/bundler/worker.rb:90:in 2024-06-24T13:22:40.7310531Zblock (2 levels) in create_threads' 2024-06-24T13:22:40.7310694Z 2024-06-24T13:22:40.7311074Z An error occurred while installing strscan (3.1.0), and Bundler cannot continue. 2024-06-24T13:22:40.7311271Z 2024-06-24T13:22:40.7311458Z In Gemfile: 2024-06-24T13:22:40.7311801Z selenium-devtools was resolved to 0.124.0, which depends on 2024-06-24T13:22:40.7312247Z selenium-webdriver was resolved to 4.21.1, which depends on 2024-06-24T13:22:40.7312536Z rexml was resolved to 3.2.8, which depends on 2024-06-24T13:22:40.7312760Z strscan 2024-06-24T13:22:41.3752180Z ERROR: While executing gem ... (Gem::Exception) 2024-06-24T13:22:41.3755568Z Failed to find gems ["strscan"] = 3.1.0 2024-06-24T13:22:41.3756314Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/commands/pristine_command.rb:119:in execute' 2024-06-24T13:22:41.3756768Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/command.rb:323:ininvoke_with_build_args' 2024-06-24T13:22:41.3757236Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/command_manager.rb:185:in process_args' 2024-06-24T13:22:41.3757665Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/command_manager.rb:149:inrun' 2024-06-24T13:22:41.3758097Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/lib/ruby/3.1.0/rubygems/gem_runner.rb:51:in run' 2024-06-24T13:22:41.3758494Z C:/hostedtoolcache/windows/Ruby/3.1.6/x64/bin/gem.cmd:29:in

'

I have tried Method 1 and 2 posted in the answer on this thread: https://stackoverflow.com/questions/78566372/azure-devops-jekyll-site-build-fails-worked-previously ...however even if I use Ruby 3.0.7 in my release pipeline, I still receive the error for hostedtoolcache in Ruby 3.1.6 directory as above. I cannot force-change the version of Ruby being used in hostedtoolcache.

I do not have the option to use anything other than Windows for testing Chrome, as this is the business requirement.

djaus2 commented 5 months ago

FYI: Found this info about strscan: https://github.com/ruby/strscan StringScanner provides for lexical scanning operations on a String.

djaus2 commented 5 months ago

Nb: Included dir C:\hostedtoolcache\windows\Ruby\3.1.6\x64\lib\ruby\gems\3.1.0\gems\strscan-3.1.0\lib in build script. The file IS there so it is a load (or vesion) issue:

 Directory of C:\hostedtoolcache\windows\Ruby\3.1.6\x64\lib\ruby\gems\3.1.0\gems\strscan-3.1.0\lib

06/24/2024  05:20 PM    <DIR>          .
06/24/2024  05:20 PM    <DIR>          ..
06/24/2024  05:20 PM            32,256 strscan.so
               1 File(s)         32,256 bytes
               2 Dir(s)  82,481,049,600 bytes free
rosslyn-beckynorville commented 5 months ago

I've also tried to use strscan in the user folder instead by using gem install strscan --user-install

I still get the same error, that the module cannot be found, but as you can see from the logs it is trying to load it from the user folder instead of hostedtoolcache, so I don't think the files/directory is the problem.

2024-06-25T07:31:09.9148333Z LoadError: 2024-06-25T07:31:09.9148817Z 126: The specified module could not be found. - C:/Users/VssAdministrator/.local/share/gem/ruby/3.1.0/gems/strscan-3.1.0/lib/strscan.so 2024-06-25T07:31:09.9150148Z # ------------------ 2024-06-25T07:31:09.9150493Z # --- Caused by: --- 2024-06-25T07:31:09.9150915Z # LoadError: 2024-06-25T07:31:09.9151248Z # cannot load such file -- httpx

The issue needs to be re-opened please @vidyasagarnimmagaddi

djaus2 commented 5 months ago

Note that in my "scratch" app I did actually put strscan into the gem file and it built OK. My blog remains errant though.

rosslyn-beckynorville commented 5 months ago

Note that in my "scratch" app I did actually put strscan into the gem file and it built OK. My blog remains errant though.

Hello again my friend, are you using Bundler to install your gems? It looks like you are. I've found a workaround although it's not a nice one: if I take Bundler out of the picture completely and just install my gems with "gem install whatever --user-install" I no longer encounter these issues on both Win 2019 and Win 2022.

Something has changed as it was all working before around 6th June. Either Windows, Hosted Agent images, Bundler or Stringscanner has changed.

I really hope this helps shed some light for you and also helps you workaround the issue.

djaus2 commented 5 months ago

Becky, thanks for the tip I'll give it a try later today.

I have used Azure Pipelines to build and publish my custom Jekyll blog site for over 4 years. Rarely have updates caused an issue. In all cases have been able to resolve them, except this one.

I followed a "formula" (see links from my blog site) for doing this publishing and was able to get it to work. But if it totally falls over with for example, a gem being required to be explicitly required, I am all at sea and am dependent upon others as per inputs here.

I am also concerned that the Pipeline Host Agent included software versions regularly change. I can't bullet proof my site against that.

David Jones (MVP)


From: Becky Norville @.> Sent: Tuesday, June 25, 2024 6:46:35 PM To: actions/runner-images @.> Cc: David Jones (MVP) @.>; Mention @.> Subject: Re: [actions/runner-images] Using the Ruby version 3.1.5 on Windows-2019 Agent failure (Issue #9999)

Note that in my "scratch" app I did actually put strscan into the gem file and it built OK. My blog remains errant though.

Hello again my friend, are you using Bundler to install your gems? It looks like you are. I've found a workaround although it's not a nice one: if I take Bundler out of the picture completely and just install my gems with "gem install whatever --user-install" I no longer encounter these issues on both Win 2019 and Win 2022.

Something has changed as it was all working before around 6th June. Either Windows, Hosted Agent images, Bundler or Stringscanner has changed.

I really hope this helps shed some light for you and also helps you workaround the issue.

— Reply to this email directly, view it on GitHubhttps://github.com/actions/runner-images/issues/9999#issuecomment-2189307661, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7U2EL5W7XVCPTGIOBP3G3ZJGGFXAVCNFSM6AAAAABI2LY5XWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBZGMYDONRWGE. You are receiving this because you were mentioned.Message ID: @.***>

djaus2 commented 5 months ago

Yes early June was when I fell over too!

djaus2 commented 5 months ago

Had a try with Becky's user approach but fell at the first hurdle: I had the Ruby >=2.14 step. followed by some gem installs commands.. First one:

gem install strscan --user-install

The following error occurred with that first pipeline command:
You don't have c:/users/vssadministrator/.local/share/gem/ruby/3.1.0/bin in your PATH, gem executables will not run

rosslyn-beckynorville commented 5 months ago

Had a try with Becky's user approach but fell at the first hurdle: I had the Ruby >=2.14 step. followed by some gem installs commands.. First one:

gem install strscan --user-install

The following error occurred with that first pipeline command: You don't have c:/users/vssadministrator/.local/share/gem/ruby/3.1.0/bin in your PATH, gem executables will not run

I had to add this to my powershell script to get around that:

C:
$env:Path = $env:userprofile + '\.local\share\gem\ruby\3.1.0\bin;' + $env:Path

(Edit: path now fixed with code block)

The other thing is that you may not need to install strscan, it seems to work fine with the hostedtoolcache version if not using Bundler. I just went ahead and installed all other gems with "gem install --user-install"

djaus2 commented 5 months ago

Adding that path to each pipeline command allowed them to work. My problem is that I need bundler for building Jekyll.

rosslyn-beckynorville commented 5 months ago

Adding that path to each pipeline command allowed them to work. My problem is that I need bundler for building Jekyll.

Sorry to hear. I wonder if it is worth opening a new ticket with all the information we've discovered in the discussion.

djaus2 commented 5 months ago

Q. If I run in the pipeline

gem install jekyll --user-install

which works OK, what would be the path to it? When I use it in the next step its not found.

djaus2 commented 5 months ago

Adding that path to each pipeline command allowed them to work. My problem is that I need bundler for building Jekyll.

Sorry to hear. I wonder if it is worth opening a new ticket with all the information we've discovered in the discussion.

I might try that. thx.

rosslyn-beckynorville commented 5 months ago

Q. If I run in the pipeline

gem install jekyll --user-install

which works OK, what would be the path to it? When I use it in the next step its not found.

It should be in c:/users/vssadministrator/.local/share/gem/ruby/3.1.0/bin

I've not used Jekyll so I can't say for sure but try changing directory back to your project path, as my code snippet above changed the drive location to C: . You may need to be in D: eg. $(System.DefaultWorkingDirectory)

rosslyn-beckynorville commented 5 months ago

Additionally I did find this, the second reply mentions that the only correct way to use Jekyll is with Bundler unfortunately https://talk.jekyllrb.com/t/jekyll-build-vs-bundle-exec-jekyll-build/5503

djaus2 commented 5 months ago

I've given up on this for now. I feel I am out of my depth. Travelling home tomorrow, Estonia to Australia. I'll take stock next week and maybe start a new issue on this. Thanks for your insight and help.

rosslyn-beckynorville commented 4 months ago

I've given up on this for now. I feel I am out of my depth. Travelling home tomorrow, Estonia to Australia. I'll take stock next week and maybe start a new issue on this. Thanks for your insight and help.

Hi friend, hope you are back in Australia safely. Please ignore this if you don't wish to follow it up any further, it is still a source of frustration for me too!

I realised that between my release pipeline running and failing, the image version at the time (20240514.3.0) hadn't changed... I checked my log files very closely and found the only thing that changed between the two runs was that Selenium webdriver gem updated from 4.18.1 to 4.21.1, and in the new 4.21.1 there was a reference to rexml 3.2.8. Prior to this, the rexml version being used was 3.2.6 and there were no errors. The update happened just a few hours after the last successful run.

I manually changed Gemfile.lock just now to force rexml version 3.2.6 and now everything works exactly as it did before while using bundle install, at least on Win2022.

image

I am now wondering whether any of your gems reference rexml, perhaps check your Gemfile.lock and see if you can workaround the issue by forcing version 3.2.6 too. Any later version of rexml needs a reference to strscan in Gemfile.lock and I think this is what is causing the entire issue (why, I still do not know).

Oh, it turns out there was a bug report for this, so I am now posting over there too: https://github.com/NixOS/nixpkgs/issues/319714 https://github.com/NixOS/nixpkgs/pull/319727

rosslyn-beckynorville commented 4 months ago

According to this link, the issue is the version of Ruby that ADO hosted agents come with, they need to be 3.2 at least:

https://bugs.ruby-lang.org/issues/20516

djaus2 commented 4 months ago

Becky thanks for the info. I now have a complete working solution using Ubuntu. I am writing a blog post on that so will give a link to that here when done.

rosslyn-beckynorville commented 4 months ago

Cheers, I had a go at running my project in Ubuntu also, it worked brilliantly but it's not really the correct environment for regression testing our application, it needs to be Windows with fully headed Chrome. I submitted this to hopefully get Ruby updated on these images, 3.1.6 is almost EOL and 3.0.7 isn't maintained at all. https://github.com/actions/runner-images/issues/10164

djaus2 commented 4 months ago

A discussion of my Ubuntu solution is here