github blog의 timezone 에러
timezone 에러
에러 발생
로컬에서 깃허브 블로그를 수정하다가 _config.yml 파일에서 timezone 부분을 timezone: Asia/Seoul 로 수정하고 ‘bundle exec jekyll serve’ 로 실행하자 아래와 같은 에러가 나왔다.
Dependency Error: Yikes! It looks like you don’t have tzinfo or one of its dependencies installed. In order to use Jekyll as currently configured, you’ll need to install this gem. If you’ve run Jekyll with bundle exec, ensure that you have included the tzinfo gem in your Gemfile as well. The full error message from Ruby is: ‘cannot load such file – tzinfo’ If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
해결
윈도우즈에서는 루비 인터프리터가 IANA 타임존 정보를 처리하는데 필요한 정보 원천이 없기 때문에, 대신 환경변수 TZ를 사용하며 그 기본값은 UTC/GMT 00:00 이다.
Jekyll 은 공식적으로 인정된 IANA 타임존 데이터베이스에 근거하여 타임존을 자체적으로 설정하는 루비 젬을 사용한다. Jekyll v3.4 또는 그 이상의 버전에서 새 블로그를 생성할 때, 기본적으로 Gemfile에 다음과 같은 내용이 추가되며, 이전에 생성된 사이트에서는 Gemfile을 수정할 필요가 있습니다.
자신의 github.io 폴더(Ahrang777.github.io)의 Gemfile 에서 아래 두 줄을 추가한다.
gem ‘tzinfo’ gem ‘tzinfo-data’, platforms: [:mingw, :mswin, :x64_mingw]
댓글남기기