1. Requirements
-
$ sudo apt-get install ruby ruby-dev build-essential
-
# It is best to avoid installing Ruby Gems as the root user.
-
# Therefore, we need to set up a gem installation directory for your user account.
-
-
# The following commands will add environment variables
-
# to your ~/.bashrc file
-
# to configure the gem installation path.
-
# Run them now:
-
-
$ echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
-
$ echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
-
$ echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
-
$ source ~/.bashrc
2. Install with RubyGems
-
$ gem install jekyll bundler # 用bundler 管理 gem 安装及依赖
-
...
-
Fetching: listen-3.0.8.gem (100%)
-
listen's executable "listen" conflicts with sass-listen
Overwrite the executable? [yN] y
Successfully installed listen-3.0.8
...
-
3. Quick-start
-
$ mkdir jekyll; cd $_
$ jekyll new myblog; cd $_
$ bundle exec jekyll serve
-
4.
Upgrade Jekyll
-
# To find the currently installed version of Jekyll,
-
# run one of these commands:
-
-
$ jekyll --version
-
$ gem list jekyll
-
# You can use RubyGems to find the current version of Jekyll.
-
# Another way to check if you have the latest version is
-
# to run the command
-
-
$ gem outdated
-
-
# This will provide a list of all the gems on your system that need to be updated.
-
# If you aren’t running the latest version, run this command:
-
-
$ bundle update jekyll
-
-
-
# Alternatively, if you don’t have Bundler installed run:
-
-
$ gem update jekyll
-
-
-
# To upgrade to latest Rubygems, run:
-
-
$ sudo gem update --system
5. Reserved for future use...
6. Reserved for future use...
7. Reserved for future use...
8. Reserved for future use...
9. Reserved for future use...
10. Reserved for future use...
Reference:
阅读(1136) | 评论(0) | 转发(0) |