Ubuntu安装jekyll

2016-04-25  本文已影响0人  包红前当了回撤并让开我来

jekyll official website

Install Ruby

We can directly use gem to install Ruby,but Ruby on ubuntu14.14 are at 1.9 version, higher than 2.2 version is expected.

ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

Install rubygems

Download it from official site , or use git.

cd ~/Downloads/ && git clone https://github.com/rubygems/rubygems.git

after downloading, switch to the director and run:

ruby setup.rb

Install jekyll

sudo gem install jekyll

May there be some error :

ERROR: Loading command: update (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass

Get into ruby-xx/ext/zlib/ , run the command below:

ruby extconf.rb
make
sudo make install

And we may meet other problem, Install sql related package:

sudo apt-get install libmysqlclient-dev

if still be error like:

ERROR: While executing gem ... (Gem::Exception)
Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources

run the command below:

gem source -r https://rubygems.org/
gem source -a http://rubygems.org/

Then install jekyll

sudo gem install jekyll

after that, check the jekyll version

jekyll -v

Jekyll 3.1.3

上一篇下一篇

猜你喜欢

热点阅读