Skip to content

Instantly share code, notes, and snippets.

@pyxn
Last active May 9, 2020 06:33
Show Gist options
  • Save pyxn/1bf5e227b38bc2d958a504eba06f5896 to your computer and use it in GitHub Desktop.
Save pyxn/1bf5e227b38bc2d958a504eba06f5896 to your computer and use it in GitHub Desktop.

// Work-in-progress // script to install jekyll on ZSH.

Installation reference on MacOS Catalina running ZSH shell

Check Ruby and Gem Locations
which ruby
which gem
/usr/bin/ruby
/usr/bin/gem
Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Install Ruby through Homebrew
brew install ruby
which ruby
which gem
/usr/local/bin/ruby
/usr/local/bin/gem
brew install rbenv ruby-build                             // install rbenv and ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc   // add to zsh
$ echo 'eval "$(rbenv init -)"' >> ~/.zshrc               // add to zsh
rbenv install -l                                          // check available versions
rbenv install 2.7.1                                       // install latest version
rbenv global 2.7.1                                        // set default to new version
rbenv rehash                                              // rehash and then exit terminal
rbenv versions                                            // verify current versions installed
ruby -v                                                   // verify ruby version
Other: Uninstall all non-default gems
for gem in `gem list --no-version`; do
  gem uninstall -aIx $gem
done
Access zsh profile (if active)
vim ~/.zshrc

// references

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment