Skip to content

Commit

Permalink
Minimal support for Ruby 3
Browse files Browse the repository at this point in the history
This isn't officially supported by Jekyll and is a bit hacky, so
I'm deliberately not documenting the support, however as recent
Ubuntu versions now ship with Ruby 3 (not 2.7) and Jekyll isn't
showing any signs of moving towards supporting Ruby 3 we're not
left with many alternatives.

This works around:
- github/pages-gem#752
- envygeeks/pathutil#5
  • Loading branch information
PeterJCLaw committed Jan 5, 2023
1 parent 84af53c commit 29500c0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ gem 'html-proofer'

# Avoid polling on windows
gem 'wdm', '>= 0.1.0'

# For local Ruby 3 support; works around https://github.com/github/pages-gem/issues/752
gem "webrick", "~> 1.7"
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ GEM
tzinfo-data (1.2018.5)
tzinfo (>= 1.0.0)
wdm (0.1.1)
webrick (1.7.0)
yell (2.2.2)

PLATFORMS
Expand All @@ -118,6 +119,7 @@ DEPENDENCIES
tzinfo
tzinfo-data
wdm (>= 0.1.0)
webrick (~> 1.7)

BUNDLED WITH
2.3.6
3 changes: 3 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ task :dependencies do
sh('bundle config set --local path "gems"')
end
sh('bundle install')

# Fix pathutil on Ruby 3; works around https://github.com/envygeeks/pathutil/pull/5
sh('sed -i.bak "s/, kwd/, **kwd/" $(bundle exec gem which pathutil)')
end

task :spelling_dependencies do
Expand Down

0 comments on commit 29500c0

Please sign in to comment.