Installing Jekyll, OpenJDK 8 and S3 Website on a Mac

In this example we will install Jekyll, OpenJDK 8, and s3_website on a Mac.

The first step will be to install Homebrew. On the Mac Terminal application copy and paste the following text:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Then we can install OpenJDK 8:

brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8

If you have multiple versions of Java on your computer, you will need jenv:

brew install jenv
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"
jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/

The last line immediately above may need to adjusted to the location on OpenJDK on your Mac.

The next step will be to install Ruby ruby 2.7.1p83. Run the following command to make sure this version of Ruby is installed on your Mac:

ruby -v

You can install the Ruby if its not the latest version with:

brew install ruby

You can find documentation on Jekyll installation at https://jekyllrb.com/docs/installation/macos/

If you have multiple versions of Ruby on your Mac you probably should install rbenv:

brew install rbenv
export PATH="$HOME/.gem/ruby/2.7.0/bin:$PATH"
rbenv install 2.7.1
rbenv global 2.7.1

Finally to install s3_website, run this command:

gem install s3_website

You should now have Ruby, Jekyll, OpenJDK 8 and S3 Website installed on your Mac!