[2]. jekyll installation and Application

Source: Internet
Author: User

1. ruby Installation

Here, we will install ruby under win, which corresponds to the number of operating system digits on our computer. For example, if my computer is 64-bit, we will download Ruby 2.0.0-p353 (x64. Then the installation process is simple:

Enter ruby-v in the command line to check whether the installation is successful:

C:\Users\Administrator>ruby -vruby 2.0.0p353 (2013-11-22) [x64-mingw32]

If the version number is displayed, the installation is successful. then install jekyll.

Ii. Install jekykll

It is best to install it in your git bash. It is said that there are hundreds of errors under the doscommand. The installation process is as follows:

$ gem install jekyllFetching: liquid-2.5.5.gem (100%)Successfully installed liquid-2.5.5Fetching: fast-stemmer-1.0.2.gem (100%)ERROR:  Error installing jekyll:The 'fast-stemmer' native gem requires installed build tools.Please update your PATH to include build tools or download the DevKitfrom 'http://rubyinstaller.org/downloads' and follow the instructionsat 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'

If an error is reported, the system prompts you to download and install "DevKit". Download and install it here. Then, the system prompts you to find your answer at http://github.com/oneclick/rubyinstaller/wiki/development-kit.

The above prompt says:

After DevKit is installed, switch to the installation directory of DevKit: cd

Run ruby dk. rb init to generate the config. yml configuration file.

Finally, install DevKit in ruby dk. rb to your ruby. For 64-bit operating systems, the following error may be reported: 'invalid configuration. please fix 'config. yml 'and rerun' ruby dk. rb install ''. the solution is to write the absolute path of the ruby directory in config. in yml, as follows:

# This configuration file contains the absolute path locations of all# installed Rubies to be enhanced to work with the DevKit. This config# file is generated by the 'ruby dk.rb init' step and may be modified# before running the 'ruby dk.rb install' step. To include any installed# Rubies that were not automagically discovered, simply add a line below# the triple hyphens with the absolute path to the Ruby root directory.## Example:## ---# - C:/ruby19trunk# - C:/ruby192dev#---- C:\Ruby200-x64

Note: Under ---, it starts with "-" And then has a blank space, and then writes the absolute path of ruby.

Then try ruby dk. rb install. The following prompt is displayed:

$ ruby dk.rb install[INFO] Updating convenience notice gem override for 'C:/Ruby200-x64'[INFO] Installing 'C:/Ruby200-x64/lib/ruby/site_ruby/devkit.rb'

The installation is successful. then install jekyll.

$ gem install jekyllTemporarily enhancing PATH to include DevKit..Building native extensions.  This could take aSuccessfully installed fast-stemmer-1.0.2Fetching: classifier-1.3.4.gem (100%)Successfully installed classifier-1.3.4Fetching: rb-fsevent-0.9.4.gem (100%)......

Check whether the installation is successful:

$ jekyll -vjekyll 1.4.3

Prompt OK!

The bestReferences

3. jekyll Application

The following is an example of "using Jekyll to build a bootstrap-based template": first download the template from github.

$ git clone https://github.com/plusjade/jekyll-bootstrap.git jekyll 

Then go to the project directory and start the jekyll service:

$ cd jekyll-bootstrap$ jekyll serve

If there is no accident, the following interface will appear:

Of course, the lines and texts that are green are just a bit boring to add.

If you are as lucky as me, the following error occurs during startup:

$ jekyll serveConfiguration file: e:/jek_demo/jekyll-bootstrap/_config.ymlSource: e:/jek_demo/jekyll-bootstrap   Destination: e:/jek_demo/jekyll-bootstrap/_site  Generating... error: Invalid argument - e:/jek_demo/jekyll-bootstrap/_site/e:. Use --trace to view backtrace

It indicates that the downloaded jekyll is the latest version, which is related to your ruby version. Uninstall the latest version here and Install Version 1.4.2:

# Uninstall jekyll $ gem uninstall jekyllRemove executables: jekyllin addition to the gem? [Yn] yRemoving jekyllSuccessfully uninstalled jekyll-1.4.3Administrator @ FANGPENG/e/jek_demo/jekyll-bootstrap (master) # install $ gem install jekyll -- version "= 1.4.2" Fetching: jekyll-1.4.2.gem (100%) Successfully installed jekyll-1.4.2Parsing documentation for jekyll-1.4.2Installing ri documentation for jekyll-1.4.21 gem installedAdministrator @ FANGPENG/e/jek_demo/jekyll-bootstrap (master) $ jekyll-vjekyll 1.4.2Administrator @ FANGPENG/e/jek_demo/jekyll-bootstrap (master) # Start the service, OK. $ jekyll serveConfiguration file: e: /jek_demo/jekyll-bootstrap/_ config. ymlSource: e:/jek_demo/jekyll-bootstrap Destination: e:/jek_demo/jekyll-bootstrap/_ site Generating... done. server address: http: // 0.0.0.0: 4000 Server running... press ctrl-c to stop.

When you access http: // localhost: 4000/, the following page is displayed:

Refer:1. Install jekyll in win7 -- create your own blog on github

2. Invalid configuration. Please fix 'config. yml .'

3. Jekyll build a free Web application on github

Iv. Next Step

1. jekyll Basics

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.