skip to Main Content

I’m using a Azure Devops Pipeline to build my Jekyll Blog Site and to publish it to Azure Blob Storage. It has of late been working OK, but I did a new post today and it failed in the Build step. All worked Ok a day or so ago. Nb: The build is triggered by a commit to to the Devops repository. The site built OK locally.

Generating script.
Script contents:
bundle exec jekyll build
========================== Starting Command Output ===========================
"C:windowssystem32cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:a_temp3f5d7781-f35f-48db-b750-9feccaae9bb5.cmd""
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `require': cannot load such file -- rexml/parsers/baseparser (LoadError)
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `<top (required)>'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `require'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `<top (required)>'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `require'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `<top (required)>'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `require'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `<class:Kramdown>'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:60:in `<module:Parser>'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:19:in `<module:Kramdown>'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:17:in `<top (required)>'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/converters/smartypants.rb:3:in `require'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll/converters/smartypants.rb:3:in `<top (required)>'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:13:in `require'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:13:in `block in require_all'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:12:in `each'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:12:in `require_all'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/lib/jekyll.rb:194:in `<top (required)>'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/exe/jekyll:8:in `require'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/jekyll-3.8.7/exe/jekyll:8:in `<top (required)>'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/bin/jekyll:23:in `load'
from C:/hostedtoolcache/windows/Ruby/3.0.0/x64/bin/jekyll:23:in `<main>'
##[error]Cmd.exe exited with code '1'.
Finishing: Build

I removed the post and recommited and it still failed.

The Build script in the Pipeine is:

bundle exec jekyll build

My gemfile follows

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", "~> 3.8.5"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
# gem "minima", "~> 2.0"

# 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.6"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0" if Gem.win_platform?

# https://github.com/pmarsceill/just-the-docs
# gem "just-the-docs"

# https://github.com/pages-themes/leap-day
gem "jekyll-theme-leap-day"

# https://github.com/jekyll/jekyll-seo-tag
gem 'jekyll-seo-tag'
gem 'jekyll-paginate'

# https://www.r-bloggers.com/creating-an-rss-feed-to-add-your-jekyll-github-pages-blog-to-r-bloggers/#:~:text=%20Creating%20an%20RSS%20Feed%20to%20Add%20Your,put%20the%20.xml%20file%20in%20the...%20More%20
# gem 'jekyll-feed'

gem "webrick" 

The pipeline scripts:

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

Following steps are Copy Site and Publish Artifact

2

Answers


  1. Chosen as BEST ANSWER

    I played around with the Ruby Version. Found if I set that script Version Spec to:

    <3.0
    

    it worked! :)


  2. Azure Devops Pipelline Jekyll Build Failure

    If you are using the private agent, please try to following steps to resolve this error:

    • Running bundle info kramdown will give you the path to where kramdown
      has been installed.
    • Run gem env to get an insight on all paths Ruby is concerned about.
    • If the directory where kramdown got installed from above isn’t listed
      in the gem env output, you’ll have to manually add that path

    If you are using the hosted agent, please try to reference following suggestions:

    Add gem "webrick" to the Gemfile in your website. Than run bundle install

    At this point you can run bundle exec jekyll build

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search