docs icon indicating copy to clipboard operation
docs copied to clipboard

Webricks currently not included by default in homebrew's ruby, leading to issues.

Open AlDacMac opened this issue 2 years ago • 6 comments

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll

What part(s) of the article would you like to see updated?

When following this article with ruby installed via homebrew, I I encountered the following error when trying to locally test my site: /Users/<user>/.gem/ruby/3.1.2/gems/jekyll-3.9.2/lib/jekyll/commands/serve/servlet.rb:3:in require': cannot load such file -- webrick (LoadError)`.

As discussed on this stackoverflow article, the issue is that webrick is not being included when homebrew is used to install Ruby 3.1.2: https://stackoverflow.com/questions/69890412/bundler-failed-to-load-command-jekyll.

I would suggest adding a line mentioning this, and telling the user to run bundle add webrick if they have used homebrew to install an affected version of ruby. Alternately, this specific error could be added to the troubleshooting jekyll errors section.

Additional information

No response


[maintainer edit]

Content plan here

AlDacMac avatar Sep 12 '22 19:09 AlDacMac

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

welcome[bot] avatar Sep 12 '22 19:09 welcome[bot]

yeah good idea.

hegdepavankumar avatar Sep 13 '22 06:09 hegdepavankumar

@AlDacMac Thanks so much for opening an issue! I'll triage this for the team to take a look :eyes:

cmwilson21 avatar Sep 13 '22 13:09 cmwilson21

Hi @AlDacMac, thanks for opening this issue! ✨ This is clearly a problem that a lot of people have run into (e.g. https://github.com/github/pages-gem/issues/752).

You or anyone else is welcome to open a PR to fix this. I'll include a very simple content plan below so it's easy for someone to identify the change.

Content plan

Running bundle exec jekyll serve to run your GitHub Page site locally can lead to an error if you're using a >3.0 version of Ruby, which doesn't come with webrick installed.

Audiences

Developers testing their Pages sites locally.

Documentation plan

In "Testing your GitHub Pages site locally with Jekyll," under the "Building your site locally" subsection, add a note under the codeblock in step 4 ({% note %} **Note:** ... {% endnote %}). Mention that:

  • If you've installed Ruby 3.0 or later (which you may have if you installed the default version via homebrew), you might get an error at this step. That's because these versions of Ruby no longer come with webrick installed.
  • To fix the error, try running bundle add webrick, then re-running bundle exec jekyll serve.

isaacmbrown avatar Oct 18 '22 09:10 isaacmbrown

Hi @cmwilson21, Taking this issue up.

dojutsu-user avatar Oct 22 '22 06:10 dojutsu-user

https://www.paypal.com/pools/c/8OmsxaiDuZ

On Mon, Sep 12, 2022, 3:29 PM Alasdair MacGillivray < @.***> wrote:

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll What part(s) of the article would you like to see updated?

When following this article with ruby installed via homebrew, I I encountered the following error when trying to locally test my site: /Users//.gem/ruby/3.1.2/gems/jekyll-3.9.2/lib/jekyll/commands/serve/servlet.rb:3:in require': cannot load such file -- webrick (LoadError)`.

As discussed on this stackoverflow article, the issue is that webrick is not being included when homebrew is used to install Ruby 3.1.2: https://stackoverflow.com/questions/69890412/bundler-failed-to-load-command-jekyll .

I would suggest adding a line mentioning this, and telling the user to run bundle add webrick if they have used homebrew to install an affected version of ruby. Additional information

No response

— Reply to this email directly, view it on GitHub https://github.com/github/docs/issues/20562, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZVIUCXQUMIFSWAGO3J7VADV56AB5ANCNFSM6AAAAAAQKYPVCQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Rambo250000000000 avatar Oct 23 '22 05:10 Rambo250000000000