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

deps: adds webrick as an explicit dependency for Ruby >=3 #133

Merged
merged 1 commit into from Jun 2, 2021

Conversation

mattxwang
Copy link
Collaborator

@mattxwang mattxwang commented Jun 1, 2021

In Ruby 3, webrick (or WEBrick) is no longer packaged in to the default installation, and needs to be explicitly installed as a gem with bundle. This PR adds it, so that the build works as-intended for users on Ruby 3.

Note that this is a no-op on Ruby 2.

for more context, see: jekyll/jekyll#8523 and github/pages-gem#752

This is a precursor to my CI work for #92!

@mattxwang
Copy link
Collaborator Author

This also leads to another question, which is: should we standardize what Ruby version we use? Typically OSX/linux comes with ~ 2.6, though Ruby 3 supposedly has pretty large performance benefits! We could also include links to rvm and enforce a version with a .rvmrc or .ruby-lang!

@mattxwang mattxwang requested a review from ctrueden June 1, 2021 22:54
@ctrueden
Copy link
Member

ctrueden commented Jun 2, 2021

should we standardize what Ruby version we use?

How does one go about doing that? Since most systems come with Ruby 2.6 or so, is there a downside to keeping compatibility with that version? You can still install Ruby 3 for the performance boost, no?

@ctrueden ctrueden merged commit cd95929 into main Jun 2, 2021
@ctrueden ctrueden deleted the add-webrick branch June 2, 2021 02:57
@mattxwang
Copy link
Collaborator Author

Thanks for the quick review! I'll start doing some CI work later tonight / earlier tomorrow.

How does one go about doing that?

To my understanding, we'd have to use something like rvm; not sure how many contributors this would affect (especially if they're on windows, where it's a bit arduous). If users have rvm, making an .rvmrc file auto-switches the user to the right ruby.

is there a downside to keeping compatibility with that version?

I don't think so necessarily, but I imagine eventually new gems will only support Ruby 3, in the same way that currently many node packages are shifting to pure ESM as Node v10 leaves LTS. Of course, if we lock users into Ruby 2, then we won't get the performance benefits from Ruby 3.

@adrienjoly
Copy link

adrienjoly commented Jun 5, 2021

The diff of this PR (found on github/pages-gem#752) helped me fixed a "Jekyll serve fails on Ruby 3.0 (webrick missing)" error when trying to serve my GitHub-pages site locally. Thank you!

@mattxwang
Copy link
Collaborator Author

The diff of this PR (found on github/pages-gem#752) helped me fixed a "Jekyll serve fails on Ruby 3.0 (webrick missing)" error when trying to serve my GitHub-pages site locally. Thank you!

Glad it was helpful! When I first encountered this problem last winter, it was definitely a headache resolving it!

adrienjoly added a commit to adrienjoly/adrienjoly.github.io that referenced this pull request Jun 5, 2021
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.

None yet

3 participants