一、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 ...
随机推荐
- jersey+jetty实现文件上传
服务配置与启动类 import org.glassfish.jersey.servlet.ServletContainer; import javax.ws.rs.Path; import org.e ...
- 【Uva 1289】Stacking Plates
[Link]: [Description] 有n(1≤n≤50)堆盘子,第i堆盘子有hi个盘子(1≤hi≤50),从上到下直径不减.所有盘 子的直径均不超过10000.有如下两种操作. split:把 ...
- CodeForce 424C Magic Formulas
这个题就是求出给的公式的结果. 仅仅要知道异或运算满足交换律跟结合律即可了.之后就是化简公式. #include<map> #include<string> #include& ...
- Nio学习3——基础模型:多路复用模型
Reactor模式和NIO 本文可看成是对Doug Lea Scalable IO in Java一文的翻译. 当前分布式计算 Web Services盛行天下,这些网络服务的底层都离不开对socke ...
- IO流学习笔记
1.File类 文件和目录路径名的抽象表示形式. 4种构造方法 File(File parent, String child) File(File parent, String child) File ...
- Linux平台下使用AdventNet ManageEngine OpUtils监控网络
AdventNet ManageEngine OpUtils 是一套系统和网络监视工具,它有Linux/Windows系统平台的免费版和企业版,该软件是一款用于监视诸如路由器,交换机,服务器或者桌面这 ...
- golang beego cache
package main import ( "fmt" "github.com/astaxie/beego/cache" "time" ) ...
- golang sync.Mutex(2)
package main import ( "fmt" "sync" "time" ) type User struct { Name st ...
- golang 函数传值
package main import ( "fmt" ) type Vertex struct { X, Y int } func dop(a Vertex, vl int) { ...
- django 简单会议室预约(6)
后台完了现在来看前端,前端用了一个bootstrap框架,看起来能好看点 先看一下文件结构:在djapp里创建了两个文件夹templates和static templates里面是要显示的页面,sta ...