Notice
Recent Posts
Recent Comments
준호씨의 블로그
jekyll 실행 시킬 때 `require': cannot load such file -- webrick (LoadError) 오류가 난다면 bundle add webrick 본문
개발이야기
jekyll 실행 시킬 때 `require': cannot load such file -- webrick (LoadError) 오류가 난다면 bundle add webrick
준호씨 2021. 3. 6. 00:05반응형
bundle exec jekyll serve로 로컬에서 jekyll 서버를 구동하려고 하면 webrick을 로드하지 못했다는 오류가 발생할 수 있습니다.
$ bundle exec jekyll serve
Configuration file: /Users/junho85/WebstormProjects/junho85.github.io/_config.yml
Source: /Users/junho85/WebstormProjects/junho85.github.io
Destination: /Users/junho85/WebstormProjects/junho85.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
done in 0.441 seconds.
Auto-regeneration: enabled for '/Users/junho85/WebstormProjects/junho85.github.io'
------------------------------------------------
Jekyll 4.2.0 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
/usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in `require': cannot load such file -- webrick (LoadError)
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:179:in `require_relative'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:179:in `setup'
...
이런 경우 bundle add webrick으로 webrick을 추가해 주고 다시 실행하면 됩니다.
$ bundle add webrick
Using public_suffix 4.0.6
Using addressable 2.7.0
Using bundler 2.2.13
Using colorator 1.1.0
Using concurrent-ruby 1.1.8
...
Using terminal-table 2.0.0
Using jekyll 4.2.0
Using jekyll-feed 0.15.1
Using jekyll-seo-tag 2.7.1
Using minima 2.5.1
Bundle complete! 6 Gemfile dependencies, 31 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
$ bundle exec jekyll serve --port 4001
Configuration file: /Users/junho85/WebstormProjects/junho85.github.io/_config.yml
Source: /Users/junho85/WebstormProjects/junho85.github.io
Destination: /Users/junho85/WebstormProjects/junho85.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
done in 0.295 seconds.
Auto-regeneration: enabled for '/Users/junho85/WebstormProjects/junho85.github.io'
Server address: http://127.0.0.1:4001/
Server running... press ctrl-c to stop.
[2021-03-05 12:14:42] ERROR `/favicon.ico' not found.
이유는 ruby 3.0.0부터 webrick이 기본으로 포함된 gem에서 빠졌기 때문입니다.
참고: github.com/jekyll/jekyll/issues/8523
www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/
반응형
'개발이야기' 카테고리의 다른 글
손코딩 뇌컴파일 눈디버깅 소개 슬라이드를 보고 (0) | 2021.03.10 |
---|---|
docker-compose - docker.credentials.errors.InitializationError: docker-credential-gcloud not installed or not available in PATH 오류 해결 (0) | 2021.03.07 |
Java - String 퀴즈. new String, constant pool 관련 (0) | 2021.03.02 |
Python 개발도구 PyCharm Community Edition 설치하기 (0) | 2021.02.14 |
git 원격 브랜치 삭제하기 (2) | 2021.02.05 |
Comments