If you don't want to install Ruby to run the website locally, a docker installation is recommended.
First off, build the image from the Dockerfile:
$ docker compose build
After that, start the docker container:
$ docker compose up -d
Inside the container, the entrypoint script has to be computed, which installs all necessary packages. This might take a bit; please have an eye on the logs. If everything runs smooth, Jekyll will start and your website is available at http://localhost:4000/.
To set up the website on your local machine, the following steps are required:
-
Install Ruby >= 2.1 if not yet available
⚠️ Note for Mac users: macOS Sierra only comes with Ruby 2.0. You must therefore install a newer one manually. The best way to do this is with tools such as Rbenv or RVM (see short instructions below).How to check which Ruby version is currently installed:
$ ruby --version -
Install Bundler if not yet available
$ gem install bundler -
Install the necessary libraries if not yet available
$ apt install build-essential patch ruby-dev libffi-dev zlib1g-dev liblzma-dev -
Install Bundles if not yet available
$ bundle install -
Start Jekyll
$ bundle exec jekyll serveNow the website can be accessed at
http://localhost:4000.
Here you can find a documentation at GitHub about how to use Jekyll locally: https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/
-
Update Ruby on a Mac
Open the terminal and enter the following command
$ \curl -sSL https://get.rvm.io | bash -s stable --rubyWhen the installation is finished, open a new terminal window and run the command
rvm list known. This shows a list of all Ruby versions. If version 2.4 is not included, you can install it withrvm install ruby-2.4.0. Find out the currently used version withruby -v. If it is an older version than 2.4, you can uservm use ruby-2.4.0to update it.