Github + Jekyll -- create a personal free blog (2) Ruby + Jekyll deployment

Source: Internet
Author: User

Github + Jekyll -- create a personal free blog (2) Ruby + Jekyll deployment

Abstract:

In this article, I will introduce how to set up a personal Blog (Blog) on github. By the way, let's take a look at githubPages, and also involve Jekyll technology.

 

============================================ ======================================

I. Environment deployment:

1. Download resources:

 

We have said that the Jekyll used to generate Web pages is based on Ruby technology, so Ruby is essential here. My current development environment is built under win7 64bit, So we downloaded the required materials on the Ruby official website, including two:

A. Ruby Installer (optional version, default to the latest version): rubyinstaller-2.3.0-x64.exe

B. DevKit for Ruby (DevKit is a toolbox that helps simplify installation and use Ruby C/C ++ extensions such as RDiscount and RedCloth on Windows): DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe

 

2. Install Ruby:

Double-click the downloaded Ruby installer and select the installation directory:

After the installation is complete, configure the system parameters: Create a RUBY_HOME variable to save the root directory of the installer and configure its bin directory to the path parameter:

After the configuration is complete, open the docs window to test whether the configuration is successful:

If the latest version is not installed, we still need to install RubyGems, but we are using the latest version, so we do not need to update it:

 

3. Install DevKit:

In step 2, we have downloaded the DevKit Installer. Double-click to open the installer and specify the decompressed directory:

Go to the decompressed directory in the command line and create the config. yml configuration file through initialization:

At this point will open the config. yml file, we can directly add the Ruby installation root directory at the end of the file:-E:/Self Blog/Ruby23-x64:

Then, install DevKit In the docs window:

 

4. Install Jekyll:

After installing Ruby, we will start to install Jekyll. In fact, this installation process depends on the previous Ruby. Open the docs window, check the Ruby version, and then run "gem install jekyll ":

If an error is found, you cannot install jekyll. The solution should be determined based on the actual situation:

Find the problem: Use "gem sources-l" to view the list of currently retrieved sources. If the reality is:

Scenario 1:The source is obtained but cannot be installed. This is because gems in foreign countries are often unstable, so we can switch to the local gems source and enter the following in docs:

Gem sources -- remove http://rubygems.org/

Gem sources-a https://ruby.taobao.org/

This function is to switch to the address for obtaining the ruby source. We can use "gem sources-l" to view the list of the currently obtained sources. Make sure that only one address is available, and we will re-install Jekyll.

 

Scenario 2:There is no source, that is, there is no download source address after the query is "*** current sources ***". In this case, we only need to add an address:

 

After resolving the problem, reinstall Jekyll, as shown in the following figure:

Verify whether the installation is successful:

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.