LoginSignup
0
0

More than 3 years have passed since last update.

Jekyll を Windows でインストールしてテーマを読み込むときの注意点!! tzinfo が必要!!

Posted at

Jekyll を Windows でインストールしてテーマを読み込むときの注意点

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

こんなエラーが出たとしたら以下のようにbeautiful-jekyll-master/Gemfileを書き直してください。

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

これでまた

cmd
PS> bundle install 

すればうまくいくはず。

体験したエラー

上のエラーが出たので、tzinfoを追加でgem install したけどうまくいかず、
tzinfo-data がwindowsだと必要らしいのでgem install したけどうまくいかず、
最後に上の方法で一括でインストールするとうまくいきました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0