Skip to content

Commit 03fed5e

Browse files
committed
Support Ruby 3
This ports the changes from srobo/website#473. 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.
1 parent 7dce873 commit 03fed5e

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ gem 'kramdown-parser-gfm'
88

99
# For testing output
1010
gem 'html-proofer'
11+
12+
# For local Ruby 3 support; works around https://github.com/github/pages-gem/issues/752
13+
gem "webrick", "~> 1.7"

Gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ GEM
7676
rb-inotify (~> 0.9, >= 0.9.7)
7777
typhoeus (1.4.0)
7878
ethon (>= 0.9.0)
79+
webrick (1.7.0)
7980
yell (2.2.2)
8081

8182
PLATFORMS
@@ -86,6 +87,7 @@ DEPENDENCIES
8687
jekyll (= 3.9)
8788
kramdown-parser-gfm
8889
rake
90+
webrick (~> 1.7)
8991

9092
BUNDLED WITH
9193
1.17.3

Rakefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ end
88

99
task :dependencies do
1010
sh('bundle install --path gems')
11+
12+
# Fix pathutil on Ruby 3; works around https://github.com/envygeeks/pathutil/pull/5
13+
# as suggested by https://stackoverflow.com/a/73909894/67873
14+
pathutil_path = `bundle exec gem which pathutil`.chomp()
15+
content = File.read(pathutil_path).gsub(', kwd', ', **kwd')
16+
File.write(pathutil_path, content)
1117
end
1218

1319
file '_sass/brand/.git' do

0 commit comments

Comments
 (0)