[GitHub Blog] bundle exec jekyll serve 실행 시 오류
Bundle exec jekyll serve 실행 했을 때 오류 발생 정리
3월 12일에 HydeJack 테마를 업그레이드 하면서 파일을 갈아엎었다.
아무래도 zip를 압축해제해서 블로그를 만들었기 때문에 다사다난 했었던 것 같다.
필자가 업그레이드를 하면서 bundle exec jekyll serve 를 구동하며 겪었던 오류를 기록하고자 한다.
1. tzinfo 관련 런타임 에러
RuntimeError: Unable to find a spec satisfying tzinfo-data (>= 0) in the set. Perhaps the lockfile is corrupted?
위와 같이 에러메세지가 떴었다.
참고링크 : Stackoverflow
- Gemfile 안에 있는 “gem ‘tzinfo-data’, platforms: [:mingw, :mswin, :x64_mingw, :jruby]” 문장에서
“, platforms: [:mingw, :mswin, :x64_mingw, :jruby]”를 지울 것. - gem uninstall tzinfo-data를 실행할 것.
- bundle install을 실행할 것.
혹은 안된다면 gem update system도 실행해볼 것.
그렇게 해서 해결했던 것 같다.
2. Indention 관련 오류
이건 필자가 yaml 문법을 몰라서 발생한 오류다..
해당 오류가 발생한다면 아래와 같은 에러메세지가 뜨게 된다.
did not find expected key while parsing a
block mapping at line 5 column 3 (Psych::SyntaxError)
이거는 문법이 잘못돼서 발생한 것인데 파이썬으로 비유하면
if True:
print('a')
이렇게 쓴 느낌일까..
여기다가 yml문서 전체를 복붙해서 에러를 검사할 수 있다.
이를 통해서 해결하였다.
3. Webrick 오류
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve/servlet.rb:3:in `require': cannot load such file -- webrick (LoadError)
위와 같이 에러메세지가 뜬다.
참고 링크 : 준호씨의 블로그
이 분의 글을 통해서 해결할 수 있었다.
bundle add webrick
코드를 실행하고 다시
bundle exec jekyll serve
를 실행해주자.
오랜 역경 끝에
Server address: http://127.0.0.1:4000/
로컬서버 구동 성공했다…