그 외
Ruby/Rbenv for Jekyll Github Blog (MacOS)
Agrafenaaa
2022. 6. 15. 15:18
1. Install Rbenv with Brew
brew update
brew install rbenv ruby-build
#check which versions are available
rbenv install -l
#install the specific version
rbenv install 2.6.10 (&& rbenv rehash)
#after installation
rbenv versions
* system
2.6.10
# if asterisk is before system, then command the line below to switch it.
rbenv global 2.6.10
If you get the error indicating FilePermissionError below, then please try to add path.
# open a vim
vim ~/.zshrc
# set a path
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# esc -> :w (to save changes) -> :q! (to exit)
source ~/.zshrc
Err) command 'source' returns the invalid message below.
/Users/myname/.zshrc:export:2: not valid in this context: Code.app/Contents/Resources/app/bin
I'd recommend to remove the path of vscode in .zshrc and source ~./zshrc again.
2. Install bundler
gem install bundler
3. Install jekyll
3-1. install nodejs as jekyll v2 requires it.
brew install nodejs
3-2. install jekyll
sudo gem install jekyll (full installation)
sudo gem install jekyll --no-rdoc --no-ri (w/o docs - fast installation)
3. check if jekyll has been installed successfully
jekyll -v