一、Github博客搭建之jekyll安装
注意:以下步骤是翻墙后操作的,需要了解翻墙的可以移步 -> 枫叶主机
一、安装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安装的更多相关文章
- 超详细Hexo+Github博客搭建小白教程
原文链接:超详细Hexo+Github博客搭建小白教程 去年9月的时候开始搭建了第一个自己的独立博客,到现在也稍微像模像样了.很多小伙伴应该也想过搭建一个自己的博客,网上也有一堆详细教程.我在此稍稍总 ...
- Pelican+Github博客搭建详细教程
操作系统:Mac OS / Linux 工具集: 1.Pelican--基于Python的静态网页生成器 2.马克飞象--Evernote出的Markdown文本编辑器 3.GoDaddy--域名供应 ...
- hexo&github博客搭建
闲来无事,偶然看到hexo,便试着玩玩,hexo是一种静态博客工具,使用nodejs流生成静态博客,速度快,主题多,附地址:https://hexo.io/ 下面详细介绍如何使用hexo在github ...
- Hexo+Github博客搭建
一.准备 1.安装git 点击下载:链接:https://pan.baidu.com/s/1eToStns 密码:r93r 安装参考之前随笔:http://www.cnblogs.com/jiangb ...
- 【博客搭建】Typecho个人博客搭建,快速安装,超小白(很简单的)
使用Typecho框架一个月又十二天了,就目前感觉来说,整体还不错,很多方面都支持个性化,二次开发,但是目前MD编辑器有一丢丢问题,不能同步滚动条滚动,就是编辑器区域滚动,预览区域没有动静,需要两边都 ...
- Hexo+Github: 博客网站搭建完全教程(看这篇就够了)
本篇教程首次发布在个人博客:sunhwee.com,想要获得最佳阅读体验,欢迎前往,建议用电脑查看教程文档. # 阅读须知 注意,这篇文章篇幅较长,主要针对新手,每一步很详细,所以可能会显得比较啰嗦, ...
- WordPress博客搭建与问题总结
一.WordPress博客搭建 1.安装Apache web服务器 yum install -y httpd systemctl restart httpd systemctl enable ht ...
- 【环境搭建】使用Jekyll搭建Github博客
前言 昨天花了差不多一天的时间,使用Jekyll搭建起了一套Github博客,感觉不错,也特将搭建过程记录下来,方便有需要的朋友自行搭建. 搭建步骤 本环境是在Linux环境下搭建完成的 安装前建议使 ...
- 在github上搭建博客(使用Jekyll)
简单说,只需要三步,就可以在 Github 搭建起一个博客: 在 Github 上建一个名为 xxx.github.io 的库: 把看中了的 Jekyll 模板 clone 到本地: 把这个模板 pu ...
随机推荐
- SQL去除字符串内部的空格
''空字符 char(13) ' ' 空格字符 char(32) 去除内部空格 去除内部空格(二) sql语句实现换行,回车 制表符: CHAR(9) 换行符: CHAR(10) 回车符: CHAR( ...
- cap理论理解
一个分布式系统里面,节点组成的网络本来应该是连通的.然而可能因为一些故障,使得有些节点之间不连通了,整个网络就分成了几块区域.数据就散布在了这些不连通的区域中.这就叫分区. 当你一个数据项只在一个节点 ...
- 【Uva 1289】Stacking Plates
[Link]: [Description] 有n(1≤n≤50)堆盘子,第i堆盘子有hi个盘子(1≤hi≤50),从上到下直径不减.所有盘 子的直径均不超过10000.有如下两种操作. split:把 ...
- 【Codeforces Round #427 (Div. 2) D】Palindromic characteristics
[Link]:http://codeforces.com/contest/835/problem/D [Description] 给你一个字符串; 让你在其中找到1..k阶的回文子串; 并统计它们的数 ...
- Delphi(Tuxedo,BDE,ADO)三合一数据集组件HsTxQuery
Delphi(Tuxedo,BDE,ADO)三合一数据集组件HsTxQuery 一.背景 为什么要做这个三合一数据集组件呢?曾经我们公司用delphi开发的系统大多以ADO,BDE方式来连接数据库,这 ...
- 没有killall命令的解决方法
没有killall命令的解决方法 -bash: killall: command not found https://www.byte128.com/archives/231.html 执行killa ...
- 对 hiren bootcd 15.2 中的 XP 系统作了汉化, 同时支持中文输入法。提供下载
对 hiren bootcd 15.2 中的 XP 系统作了汉化, 同时支持中文输入法.提供下载 对该PE 中的 XP 系统作了汉化, 由于一个 中文字库 就要 10M 多:加之原系统过于精简,对中文 ...
- jquery init 关系
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/st ...
- actionmode-ActionMode以及它的menu使用
下图左边效果为Context Menu右边效果为ActionMode. ActionMode 其实就是替换在actionbar的位置上显示的一个控件.它跟actionbar一样,也是一种导航作用.只不 ...
- Arrays.asList()方法的限制
Arrays.asList()方法的限制是他对所产生的List类型做出了最理想的假设 package example; import java.util.Arrays; import java.uti ...