TOP

一、Github博客搭建之jekyll安装(一)
2017-10-09 13:27:21 】 浏览:10434
Tags:Github 博客 搭建 jekyll 安装

注意:以下步骤是FQ后操作的,需要了解FQ的可以移步 -> 枫叶主机

一、安装jekyll需要Ruby-2.1.0以上版本,本人是mac pro系统版本10.12.5(macOS Sierra),系统内置的Ruby是2.0.0。

  1、安装RVM

    RVM: Ruby Version Manager, Ruby的版本管理器,包括Ruby的版本管理和Gem库管理(gemset);

     $ curl -L get.rvm.io | bash -s stable

  2、验证是否安装成功

   $ source ~/.bashrc

   $ source ~/.bash_profile

二、安装home-brew(切记先安装home-brew,再安装ruby!!)

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

三、安装Ruby

  1、查看当前版本

youcanpingdeMacBook-Pro:~ issuser$ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]

  2、查看rvm中的ruby可以升级的版本

youcanpingdeMacBook-Pro:~ issuser$ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-head] # security released on head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p330]
[ruby-]1.9.3[-p551]
[ruby-]2.0.0[-p648]
[ruby-]2.1[.10]
[ruby-]2.2[.7]
[ruby-]2.3[.4]
[ruby-]2.4[.1]
ruby-head

  3、我升级Ruby到最新用ruby-head,安装过程中会安装需要的依赖包。

youcanpingdeMacBook-Pro:~ issuser$ rvm install ruby-head
Checking requirements for osx.
Installing requirements for osx.
Updating system.........
Installing required packages: openssl@1.1...
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/issuser/.rvm/rubies/ruby-head, this may take a while depending on your cpu(s)...
Cloning from https://github.com/ruby/ruby.git, this may take a while depending on your connection/
.
HEAD is now at 6ee82564fa stringio.c: encoding at EOF
From https://github.com/ruby/ruby
 * branch                  trunk      -> FETCH_HEAD
Already up-to-date.
git checkout trunk
Copying from repo to src path...
ruby-head - #autoreconf.
ruby-head - #configuring.......................................................|
ruby-head - #post-configuration.
ruby-head - #compiling.........................................................|
ruby-head - #installing.........
ruby-head - #making binaries executable..
Installed rubygems 2.6.12 is newer than ignore provided with installed ruby, skipping installation, use --force to force installation.
ruby-head - #gemset created /Users/issuser/.rvm/gems/ruby-head@global
ruby-head - #importing gemset /Users/issuser/.rvm/gemsets/global.gems...........
ruby-head - #generating global wrappers........
ruby-head - #gemset created /Users/issuser/.rvm/gems/ruby-head
ruby-head - #importing gemsetfile /Users/issuser/.rvm/gemsets/default.gems eva luated to empty gem list
ruby-head - #generating default wrappers........
ruby-head - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-head - #complete 
Ruby was built without documentation, to build it run: rvm docs generate-ri
youcanpingdeMacBook-Pro:~ issuser$ 

   4、查看当前ruby版本是否变为ruby-2.2.4,如果没变就执行 rvm use ruby-2.2.4,在查看版本就是最新的了

youcanpingdeMacBook-Pro:~ issuser$ ruby -v
ruby 2.5.0dev (2017-08-12 trunk 59578) [x86_64-darwin16]
youcanpingdeMacBook-Pro:~ issuser$ rvm use ruby-head
Using /Users/issuser/.rvm/gems/ruby-head

  5、安装ruby报如下错

Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.10/x86_64/ruby-2.1.5. Continuing with compilation. Please read 'rvm help mount' to get more informatio  
		
一、Github博客搭建之jekyll安装(一) https://www.cppentry.com/bencandy.php?fid=87&id=124372

首页 上一页 1 2 3 下一页 尾页 1/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇GitLab Development Kit 环境搭建 下一篇学习笔记TF036:实现Bidirectional..