Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal support for Ruby 3 #473

Merged
merged 5 commits into from
Jan 8, 2023
Merged

Minimal support for Ruby 3 #473

merged 5 commits into from
Jan 8, 2023

Conversation

PeterJCLaw
Copy link
Member

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:

If we're happy with this fix I'll also apply it to our other Jekyll projects (docs, style, competition-website).

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
@PeterJCLaw PeterJCLaw marked this pull request as ready for review January 5, 2023 23:09
@RealOrangeOne
Copy link
Member

As part of this, it might be nice to add Ruby 3 to the CI matrix, so we make sure we keep support. I'm not sure what timeframe you imagine us switching the default install to 3 ( I too share the plague of trying to use older Ruby versions).

@PeterJCLaw
Copy link
Member Author

As part of this, it might be nice to add Ruby 3 to the CI matrix, so we make sure we keep support.

Well that kinda implies it's supported ... which it isn't.

I'm not sure what timeframe you imagine us switching the default install to 3 ( I too share the plague of trying to use older Ruby versions).

At the moment, none. I don't think we can default to that until the production build (i.e: GitHub Pages itself) switches.

In theory we could move to the manual github pages (via Actions) mechanism, but even then I'm not keen on the production build involving the level of hacks needed here.

@PeterJCLaw
Copy link
Member Author

Essentially I see this at the moment as being for those who know what they're doing and want to risk Ruby 3, rather than something we want to encourage people to use.

Rakefile Outdated

# Fix pathutil on Ruby 3; works around https://github.com/envygeeks/pathutil/pull/5
# as suggested by https://stackoverflow.com/a/73909894/67873
sh('sed -i.bak "s/, kwd/, **kwd/" $(bundle exec gem which pathutil)')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think sed comes as standard on Windows. Can we do this in a cross platform way or only run this fix where sed is available?

Copy link
Member Author

@PeterJCLaw PeterJCLaw Jan 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f0e143c ef3e8cb hopefully does this.

@PeterJCLaw
Copy link
Member Author

Ignore the CircleCI failure -- we don't use CircleCI for this project any more.

Rakefile Outdated Show resolved Hide resolved
Rakefile Outdated Show resolved Hide resolved
Rakefile Outdated Show resolved Hide resolved
@raccube
Copy link
Member

raccube commented Jan 8, 2023

We should switch over to building the site ourselves in GitHub Actions using the Publish to GitHub Pages action. This would allow us to use a more up to date version of Jekyll.

PeterJCLaw and others added 2 commits January 8, 2023 17:40
Co-authored-by: Karina Kwiatek <6197148+raccube@users.noreply.github.com>
Co-authored-by: Karina Kwiatek <6197148+raccube@users.noreply.github.com>
If needed, reinstalling the gem is easy enough.
@PeterJCLaw PeterJCLaw merged commit 3c1b3b2 into master Jan 8, 2023
@PeterJCLaw PeterJCLaw deleted the support-ruby-3 branch January 8, 2023 19:23
PeterJCLaw added a commit to srobo/docs that referenced this pull request Jan 8, 2023
This ports the changes from srobo/website#473.
PeterJCLaw added a commit to srobo/docs that referenced this pull request Jan 8, 2023
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.
PeterJCLaw added a commit to srobo/competition-website that referenced this pull request Jan 8, 2023
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.
PeterJCLaw added a commit to srobo/competition-website that referenced this pull request Jan 8, 2023
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.
PeterJCLaw added a commit to srobo/style that referenced this pull request Jan 8, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants