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

一、安装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 evaluated 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 information on binary rubies. Checking requirements for osx. Installing requirements for osx. Updating system.......... Installing required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libksba, openssl...... Error running 'requirements_osx_brew_libs_install autoconf automake libtool pkg-config libyaml readline libksba openssl', showing last 15 lines of /Users/wjf/.rvm/log/1417267175_ruby-2.1.5/package_install_autoconf_automake_libtool_pkg-config_libyaml_readline_libksba_openssl.log ++ case "$1" in ++ [[ -t 1 ]] ++ return 1 ++ printf %b 'There were package installation errors, make sure to read the log.

  解决方法,安装xcode命令行工具,如果已有则升级到最新

$ xcode-select --install

四、安装jekyll

youcanpingdeMacBook-Pro:~ issuser$ gem install jekyll
Fetching: public_suffix-2.0.5.gem (100%)
Successfully installed public_suffix-2.0.5
Fetching: addressable-2.5.1.gem (100%)
Successfully installed addressable-2.5.1
Fetching: colorator-1.1.0.gem (100%)
Successfully installed colorator-1.1.0
Fetching: rb-fsevent-0.10.2.gem (100%)
Successfully installed rb-fsevent-0.10.2
Fetching: ffi-1.9.18.gem (100%)
Building native extensions. This could take a while...
Successfully installed ffi-1.9.18
Fetching: rb-inotify-0.9.10.gem (100%)
Successfully installed rb-inotify-0.9.10
Fetching: sass-listen-4.0.0.gem (100%)
Successfully installed sass-listen-4.0.0
Fetching: sass-3.5.1.gem (100%)
Successfully installed sass-3.5.1
Fetching: jekyll-sass-converter-1.5.0.gem (100%)
Successfully installed jekyll-sass-converter-1.5.0
Fetching: listen-3.0.8.gem (100%)
Successfully installed listen-3.0.8
Fetching: jekyll-watch-1.5.0.gem (100%)
Successfully installed jekyll-watch-1.5.0
Fetching: kramdown-1.14.0.gem (100%)
Successfully installed kramdown-1.14.0
Fetching: liquid-4.0.0.gem (100%)
Successfully installed liquid-4.0.0
Fetching: mercenary-0.3.6.gem (100%)
Successfully installed mercenary-0.3.6
Fetching: forwardable-extended-2.6.0.gem (100%)
Successfully installed forwardable-extended-2.6.0
Fetching: pathutil-0.14.0.gem (100%)
Successfully installed pathutil-0.14.0
Fetching: rouge-1.11.1.gem (100%)
Successfully installed rouge-1.11.1
Fetching: safe_yaml-1.0.4.gem (100%)
Successfully installed safe_yaml-1.0.4
Fetching: jekyll-3.5.1.gem (100%)
Successfully installed jekyll-3.5.1
Parsing documentation for public_suffix-2.0.5
Installing ri documentation for public_suffix-2.0.5
Parsing documentation for addressable-2.5.1
Installing ri documentation for addressable-2.5.1
Parsing documentation for colorator-1.1.0
Installing ri documentation for colorator-1.1.0
Parsing documentation for rb-fsevent-0.10.2
Installing ri documentation for rb-fsevent-0.10.2
Parsing documentation for ffi-1.9.18
Installing ri documentation for ffi-1.9.18
Parsing documentation for rb-inotify-0.9.10
Installing ri documentation for rb-inotify-0.9.10
Parsing documentation for sass-listen-4.0.0
Installing ri documentation for sass-listen-4.0.0
Parsing documentation for sass-3.5.1
Installing ri documentation for sass-3.5.1
Parsing documentation for jekyll-sass-converter-1.5.0
Installing ri documentation for jekyll-sass-converter-1.5.0
Parsing documentation for listen-3.0.8
Installing ri documentation for listen-3.0.8
Parsing documentation for jekyll-watch-1.5.0
Installing ri documentation for jekyll-watch-1.5.0
Parsing documentation for kramdown-1.14.0
Installing ri documentation for kramdown-1.14.0
Parsing documentation for liquid-4.0.0
Installing ri documentation for liquid-4.0.0
Parsing documentation for mercenary-0.3.6
Installing ri documentation for mercenary-0.3.6
Parsing documentation for forwardable-extended-2.6.0
Installing ri documentation for forwardable-extended-2.6.0
Parsing documentation for pathutil-0.14.0
Installing ri documentation for pathutil-0.14.0
Parsing documentation for rouge-1.11.1
Installing ri documentation for rouge-1.11.1
Parsing documentation for safe_yaml-1.0.4
Installing ri documentation for safe_yaml-1.0.4
Parsing documentation for jekyll-3.5.1
Installing ri documentation for jekyll-3.5.1
Done installing documentation for public_suffix, addressable, colorator, rb-fsevent, ffi, rb-inotify, sass-listen, sass, jekyll-sass-converter, listen, jekyll-watch, kramdown, liquid, mercenary, forwardable-extended, pathutil, rouge, safe_yaml, jekyll after 35 seconds
19 gems installed
youcanpingdeMacBook-Pro:~ issuser$

  五、jekyll创建blog,发现报错了

youcanpingdeMacBook-Pro:~ issuser$ jekyll new Blog
Dependency Error: Yikes! It looks like you don't have bundler or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- bundler' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
jekyll 3.5.1 | Error: bundler
youcanpingdeMacBook-Pro:~ issuser$ gem install bundler
Fetching: bundler-1.15.3.gem (100%)
Successfully installed bundler-1.15.3
Parsing documentation for bundler-1.15.3
Installing ri documentation for bundler-1.15.3
Done installing documentation for bundler after 5 seconds
1 gem installed
youcanpingdeMacBook-Pro:~ issuser$ jekyll new blog
Conflict: /Users/issuser/blog exists and is not empty.
youcanpingdeMacBook-Pro:~ issuser$ cd Desktop/
youcanpingdeMacBook-Pro:Desktop issuser$ cd GitHub/
youcanpingdeMacBook-Pro:GitHub issuser$ LS
youcanping.github.io
youcanpingdeMacBook-Pro:GitHub issuser$ cd youcanping.github.io/
youcanpingdeMacBook-Pro:youcanping.github.io issuser$ jekyll server


 



一、Github博客搭建之jekyll安装的更多相关文章

  1. 超详细Hexo+Github博客搭建小白教程

    原文链接:超详细Hexo+Github博客搭建小白教程 去年9月的时候开始搭建了第一个自己的独立博客,到现在也稍微像模像样了.很多小伙伴应该也想过搭建一个自己的博客,网上也有一堆详细教程.我在此稍稍总 ...

  2. Pelican+Github博客搭建详细教程

    操作系统:Mac OS / Linux 工具集: 1.Pelican--基于Python的静态网页生成器 2.马克飞象--Evernote出的Markdown文本编辑器 3.GoDaddy--域名供应 ...

  3. hexo&github博客搭建

    闲来无事,偶然看到hexo,便试着玩玩,hexo是一种静态博客工具,使用nodejs流生成静态博客,速度快,主题多,附地址:https://hexo.io/ 下面详细介绍如何使用hexo在github ...

  4. Hexo+Github博客搭建

    一.准备 1.安装git 点击下载:链接:https://pan.baidu.com/s/1eToStns 密码:r93r 安装参考之前随笔:http://www.cnblogs.com/jiangb ...

  5. 【博客搭建】Typecho个人博客搭建,快速安装,超小白(很简单的)

    使用Typecho框架一个月又十二天了,就目前感觉来说,整体还不错,很多方面都支持个性化,二次开发,但是目前MD编辑器有一丢丢问题,不能同步滚动条滚动,就是编辑器区域滚动,预览区域没有动静,需要两边都 ...

  6. Hexo+Github: 博客网站搭建完全教程(看这篇就够了)

    本篇教程首次发布在个人博客:sunhwee.com,想要获得最佳阅读体验,欢迎前往,建议用电脑查看教程文档. # 阅读须知 注意,这篇文章篇幅较长,主要针对新手,每一步很详细,所以可能会显得比较啰嗦, ...

  7. WordPress博客搭建与问题总结

      一.WordPress博客搭建 1.安装Apache web服务器 yum install -y httpd systemctl restart httpd systemctl enable ht ...

  8. 【环境搭建】使用Jekyll搭建Github博客

    前言 昨天花了差不多一天的时间,使用Jekyll搭建起了一套Github博客,感觉不错,也特将搭建过程记录下来,方便有需要的朋友自行搭建. 搭建步骤 本环境是在Linux环境下搭建完成的 安装前建议使 ...

  9. 在github上搭建博客(使用Jekyll)

    简单说,只需要三步,就可以在 Github 搭建起一个博客: 在 Github 上建一个名为 xxx.github.io 的库: 把看中了的 Jekyll 模板 clone 到本地: 把这个模板 pu ...

随机推荐

  1. SuSe Linux Enterprise Server 10 With Sp2 安装过程图解

    SuSe Linux Enterprise Server 10 With Sp2 安装过程图解 650) this.width=650;" style="border-right- ...

  2. [ Java ] [ Eclipse ] 加速 Eclipse 載入速度-轉載

    加速 Eclipse 載入速度-轉載 https://read01.com/NJjNOB.html

  3. 27.mutex跨进程通信

    创建互斥量mutex HANDLE mutex = CreateMutexA(NULL, TRUE, name); 根据id打开mutex HANDLE mutex = OpenMutexA(MUTE ...

  4. sqlserver 导入excel数据

    有的时候需要将excel数据导入到数据库中,这里介绍一下操作方法: 1.可能需要安装sqlserver的插件 [AccessDatabaseEngine],这个可以在网上早,很多. 2.安装插件后,右 ...

  5. JS 实现图片模态框,幻灯片,跑马灯功能

    网站中常用的幻灯片和模态框,使用 HTML.JavaScript 与 CSS 来创建 Lightbox,类似相册预览功能.可以运用到视频网站,商城,相册上去 参考了菜鸟教程,有兴趣自己去看 HTML/ ...

  6. USACO 2009 Dec cow toll paths 过路费-floyd

    这道题首先要明确一点,那就是当你从一个点走到自己时,也是需要花费这个点点权值的费用.这个点卡了我两次QWQ 然后我比较喜欢分两步搞: 首先,我们利用floyd的一个性质:就是在更新其他点之间的路线时要 ...

  7. 25.Spring @Transactional工作原理

    转自:http://www.importnew.com/12300.html 本文将深入研究Spring的事务管理.主要介绍@Transactional在底层是如何工作的.之后的文章将介绍: prop ...

  8. 修饰器&高阶组件

    一.修饰器 1.类的修饰 修饰器是一个函数,用来修改类的行为 function testable(target) { target.isTestable = true; } @testable cla ...

  9. PythonServer

    服务器模型 硬件服务器 主机.集群 厂商:IBM.HP.联想.浪潮 软件服务器:编写的服务端应用程序,在硬件服务器上运行,一般依托于操作系统,给用户提供一套完整的服务 httpserver:处理htt ...

  10. 洛谷 P1497 木牛流马

    P1497 木牛流马 题目描述 孔明造出了木牛流马 木牛者,方腹曲头,一脚四足,头入领中,舌著于腹.载多而行少,宜可大用,不可小使:特行者数十里,群行者二十里也.曲者为牛头,双者为牛脚,横者为牛领,转 ...