Forked from r-brown/howto-install-jekyll_homebrew-rbenv.txt
Created
January 10, 2018 23:21
-
-
Save jsntn/ed5c675fccd1bfa92de6b18595f98bc1 to your computer and use it in GitHub Desktop.
How to install Jekyll using Homebrew and rbenv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install Homebrew: https://wheat.at/mac/2017/12/09/homebrew.html | |
$ su ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# show brew commands | |
$ brew help | |
# check current user | |
$ echo $(whoami) | |
# grant access to the folders | |
$ sudo chown -R $(whoami) /usr/local | |
$ sudo chown -R $(whoami) /Library/Caches/Homebrew/ | |
# uninstall brew ruby | |
$ brew uninstall ruby | |
# install rbenv | |
$ brew update | |
$ brew install rbenv ruby-build | |
# add ~/.rbenv/bin to your $PATH for access to the rbenv command-line utility | |
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
# add rbenv init to your shell to enable shims and autocompletion | |
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
# install ruby via rbenv | |
$ rbenv install 2.4.2 | |
$ rbenv global 2.4.2 | |
$ rbenv versions | |
# check install path | |
$ which ruby | |
$ which gem | |
$ which jekyll | |
# rehash | |
$ rbenv rehash | |
# check ruby version and environment | |
$ ruby --version | |
$ gem env | |
# install jekyll bundler | |
$ gem install jekyll bundler | |
# initialize project | |
$ jekyll new <my-project-name> | |
# go to the project folder | |
$ cd <project folder> | |
# install / update gems | |
$ bundle install | |
or | |
$ bundle update | |
# show installed jekyll | |
$ bundle show jekyll | |
# serve jekyll pages | |
$ bundle exec jekyll serve --drafts --config _config.yml,_config_dev.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment