Jekyll Now Reinstall
Having migrated to a new laptop, I needed to reinstall Jekyll Now. And it failed. But then it worked.
Because I was able to clone the git repo to my local, and that repo was already configured/set for publishing to github pages, all I needed to do was install github pages locally, rather than Jekyll etc.
I could make changes, commit the change, push it and it would appear on the live site, but I couldn’t preview it locally with Jekyll. Hence why github pages locally installed, it contains Jekyll.
However, when trying to install
github-pages I was getting this error:
gem install github-pages ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
Summary below (Antonio explains it in more detail)
brew update && brew install rbenv ruby-build export path="$HOME/.rbenv/bin:$PATH"
Add the following to
Added the following to
source $HOME/.zshenv eval "$(rbenv init - zsh)"
Restart the iterm2 and run the following commands
rbenv install 2.6.5 rbenv global 2.6.5
Restart iterm2 and run the following command
You should see something like:
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19] returned
Then run this command
ruby -e "puts (1..100).reduce(:+)"
You should see
Now install github-pages
gem install github-pages
Now when running
jekyll serve in the root of the local repo, I can use a browser to view the site before issuing a
He was getting a similar error for htmlbeautifier. His explaination contains more detail.↩︎