Needed to set Ruby <3.0 to solve Build failure in Azure Devops Pipeline.

My Blog Site is hosted on Azure Devops which acts as the repository as well as building it in a Pipeline and then deploying to it to Azure Blob Storage. The summary of the pipeline is:

Pipeline: Agent pool: Hosted VS2017
Get Resources: The repository, Master Branch, also tried a branch gleaned for earlier submit. Clean:False
Use Ruby>-2.4: Version Spec >=2.4  AddToPath is checked
Install Jekyll and bundler: gem install jekyll bundler
Install Gems: bundle install
Build: bundle exec jekyll build
Copy Site
Publish Artifact

Nb>I have previous discussed setting up this site using Jekyll as an Azure Pipeline with the site contents reposited to Azure, built in a Pipeline then deployed to Azure Blob Storage. Look under the Web heading inteh sidebar.

Recently the pipeline started failing on the Build step. I posted about this on StackOverflow here but ended up solving it myself. There was a new version of Ruby Version 3 relased late last year (actually on Christmas Day!) which is a much change. See here. After much trial and error I found if I set the Ruby Version Spec to < 3.0 my build now works!

Outcome: One related post states that Ruby 3 does not automatically include several Gems, which is the issue here. This blog site builds OK with the <3.0 so I’ll stick with that for now.


 TopicSubtopic
  Next: > Blazor Helpers App
<  Prev:   Blazor Helpers App
   
 This Category Links 
Category:Web Sites Index:Web Sites
  Next: > An Azure Static Web App with EF
<  Prev: