Jekyll Setup for MacOS
- Macbook Pro (Not M series)
- Shell is zsh
- Homebrew properly installed
- Document date: 2022.12.08
Preview
Run the following command
1
| $ bundle exec jekyll serve
|
Install Ruby
Ruby version 3.1.3
1
| $ brew install ruby-install
|
If ruby-install
has been installed previously, force link
1
| $ brew link --overwrite ruby-install
|
To see which ruby
version is supported, run
Add following lines to ~/.zshrc
1
2
3
| source /usr/local/opt/chruby/share/chruby/chruby.sh
source /usr/local/opt/chruby/share/chruby/auto.sh
chruby 3.1.3
|
Install Jekyll
Jekyll version 4.3.1.
Run which gem
to make sure you actually use the correct gem
and ruby
.
- Install
jekyll
, github-pages
, and bundle
1
2
3
| $ gem install jekyll
$ gem install github-pages
$ gem install bundle
|
- Install gems in the Gemfile
If there is a Gemfile.lock
in the current directory, delete it, then run