[Ruby] Notes on installing Jekyll on Windows and loading themes! !! tzinfo required!!

less than 1 minute read

Notes on installing Jekyll on Windows and loading themes

cmd


PS C:\Users\----\Documents\blog\beautiful-jekyll-master> bundle exec jekyll serve
  fatal: not a git repository (or any of the parent directories): .git
  Configuration file: C:/Users/hideki/Documents/blog/beautiful-jekyll-master/_config.yml
  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. 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/!
  jekyll 3.8.7 | Error: tzinfo

If you get this error, rewrite beautiful-jekyll-master/Gemfile as follows.

beautiful-jekyll-master/Gemfile


# frozen_string_literal: true

source "https://rubygems.org"

gem'tzinfo','~> 2.0'
gem'tzinfo-data','~> 1.2020','>= 1.2020.1'

gemspec

This again

cmd


PS> bundle install

It should work.

Experienced error

Since the above error appeared, I added gtz install with tzinfo but it did not work, Since tzinfo-data seems to be necessary for windows, I did gem install but it does not work, Finally, when I installed it all at once using the above method, it worked.