Why do you write this article? Because of the official installation documentation, many of Ruby's libraries do not describe how to install them. So it's important to explain.
1, my installation environment is vultr of the 16.04 version of Ubuntu.
2, because Ruby's extension library is a lot of GCC compiled binary libraries, so first to install the compilation package build-essential and Ruby-dev and patch
3, in Ruby Nokogiri (parse XML file of a library) also need special package Zlib1g-dev Liblzma-dev, in order to install successfully.
4, in short build-essential ruby-dev patch Zlib1g-dev Liblzma-dev These 5 packages must be installed.
5, the installation procedure. The official tip says try not to install with root user, have security hidden trouble.
1. sudo apt-get update
2, sudo apt-get dist-upgrade
3. Sudo apt-get install build-essential patch
4, sudo apt-get install Ruby-dev zlib1g-dev liblzma-dev
5, Ruby--version//Must be 2.0 or more
6. Gem Install bundler
7. Git init test//Create test working directory
8. CD Test
9, git checkout-b gh-pages//github rules must be Gp-pages branch to be submitted to the pages.
10, Vim gemfile//Add 2 lines
source ' https://rubygems.org '
Gem ' github-pages ', Group:: Jekyll_plugins
11, Bundle install//According to just gemfile installation.
12, if the last appearance of ' Thank you ' words, indicating the installation success.
6, establish a website.
bundle exec Jekyll new--force
7. Run the local server.
bundle exec Jekyll serve
Installing jeklly with Bundler