This guide will show you step by step how to install Jekyll 3.4.3 on a machine running Ubuntu or Windows 10. Jekyll’s official guide is good, but it’s very basic and doesn’t explain how to install Ruby, RubyGems and other dependencies.
What you need:
- An Ubuntu 16.04 or Windows 10 system. This guide should also work for older Ubuntu 14.04
- And as always, an internet connection
Skip to step 2 if you’re installing Jekyll on Ubuntu.
To install Jekyll on Windows 10, we need to first enable Windows Subsystem on Linux. Here is a detailed guide that will show you how to do this step-by-step.
We will now install ruby2.3. To do so, we have to first add the brightbox repository. When asked whether you want to confirm adding the repository, hit ENTER to proceed.
sudo apt-add-repository ppa:brightbox/ruby-ng sudo apt-get update
sudo apt-get install ruby2.3 ruby2.3-dev
Now you should have Ruby and RubyGems installed which are the prerequisite for installing Jekyll.
sudo apt-get install gcc make -y
Install Jekyll and Bundler gems
sudo gem install jekyll
Guess what? That’s it. You have Jekyll 3.4.3 installed.
Here are some commands from jekyllrb.com that should get you up and running with a new blog.
# Create a new Jekyll site at ./wiseblog jekyll new wiseblog
To build this site:
# Change into your new directory cd wiseblog # Build the site and preview it bundle exec jekyll serve
Note: If you’re running Windows, you may get an error when you try to run
bundle exec jekyll serve. In this case, simply run it with the
--force_polling option as follows:
bundle exec jekyll serve --force_polling
Now you can preview your website on
(You can skip this part. This is only for my reference and for anyone who faces a similar issue)
I had to install Nokogiri for my site and was having issues. This is how I solved it.
Below are the installation instructions on nokogiri.org:
sudo apt-get install build-essential patch sudo apt-get install ruby-dev zlib1g-dev liblzma-dev sudo gem install nokogiri
(header image source: jekyllrb.com)