-
Notifications
You must be signed in to change notification settings - Fork 358
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
Jekyll serve fails on Ruby 3.0 (webrick missing) #752
Comments
Ruby 3.0 no longer comes with webrick
|
Hi! In general, we recommend (and support) running the github-pages gem with the Ruby version we're running in production (2.7.x). We don't yet support Ruby 3.0.0. Ruby 2.7.x still has webrick so I'd recommend using that until we've upgraded for your GitHub Pages needs! |
This really should be in the official documentation: it's severely lacking small details like this that takes hours digging around to figure out. |
Totally. What a way to waste a Sunday trying to solve this after doing the responsible thing and using latest Ruby... |
Definitely needs to be added to the documentation. |
[Jekyll doesn't work with ruby 3.0.0](github/pages-gem#752 (comment))
Definitely needs to be upgraded to support Ruby 3.0 |
- github-pages gem이 Ruby3 버전을 지원하지 않아서 따로 추가해서 해결 - github/pages-gem#752 (comment)
This saved me while I was trying to run "bundle exec jekyll serve" |
Can we add the information about what is the current version of Ruby being used to build Github pages to the README? |
All of the latest versions we're running on GitHub Pages are shown here: https://pages.github.com/versions/ There's even a JSON endpoint: https://pages.github.com/versions.json I wrote a blog post a while back about staying up to date by using that endpoint. Not sure how well it works today but you could add to your gemfile:
This will tell bundler to use the ruby version that GitHub Pages uses. |
If anyone would like to submit a PR to update the README, I'd be happy to review. I'll try to update the README soon if not. |
As suggested in imagej/imagej.github.io#133, adding |
Ruby 3.0 no longer comes with webrick. issue: github/pages-gem#752
This is to work around: - jekyll/jekyll#8523 - github/pages-gem#752
Exactly what I was looking for! Thank you. |
adding webrick worked for me too running ruby 3.x |
Since Ruby version 3.0.0 or higher do not come with [webrick](github/pages-gem#752). There is already a warning on the [Quickstart](https://jekyllrb.com/docs/) page. This change adds a similar warning on the `01-setup.md`. Alternatively, a warning can also be added on line 34 to put in `gem "webrik"` if using Ruby version >= 3.0.0.
This is probably a bit more serious now that 2.7 is End of Life (https://www.ruby-lang.org/en/news/2023/03/30/ruby-2-7-8-released/). 😬 |
@parkr, |
@i'm |
This has already been fixed as of Jekyll 4.3.0. If you're using GitHub Pages (like @harriot) I'd recommend using the official GitHub Actions (starter workflow). |
- Run `bundle update` to update dependencies - Add `webrick` per [this solution][1] and [this issue][2] - Jekyll `4.3.0` fixes this but the `github-pages` gem is using `3.9.3` [1]: https://stackoverflow.com/a/70916831/4002016 [2]: github/pages-gem#752
- Migrate to Ruby 3 - Update `github-pages` - Add `webrick` per [this solution][1] and [this issue][2] - Jekyll `4.3.0` fixes this but the `github-pages` gem is using `3.9.3` [1]: https://stackoverflow.com/a/70916831/4002016 [2]: github/pages-gem#752
`bundle add webrick # Solves https://github.com/github/pages-gem/issues/752`
This commit downgrades the ruby verison in the awesome-bot job to the version that is supported by the [github-pages gem](github/pages-gem#752 (comment)).
This commit downgrades the ruby verison in the awesome-bot job to the version that is supported by the [github-pages gem](github/pages-gem#752 (comment)).
``` bundler: failed to load command: jekyll `require': cannot load such file -- webrick (LoadError)` ``` github/pages-gem#752
bundle add webrick Apparently, github-pages are built using Ruby 2 and Ruby 3 doesn't include a gem called webrick. See github/pages-gem#752 for more details.
This issue affects
What did you do (e.g., steps to reproduce)
On macOS 10.15 with Ruby 3.0.0 from Homebrew, using the latest github-pages in a Gemfile.
What happened instead?
Additional information
Reported upstream at jekyll/jekyll#8523. Upstream has fixed this in the main branch for the next Jekyll 4 release, however this is unlikely to benefit GitHub Pages anytime soon, so it might be good to add this here for the time being.
The text was updated successfully, but these errors were encountered: