惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
WordPress大学
WordPress大学
小众软件
小众软件
Cloudbric
Cloudbric
AWS News Blog
AWS News Blog
腾讯CDC
量子位
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
Scott Helme
Scott Helme
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
C
CXSECURITY Database RSS Feed - CXSecurity.com
The Hacker News
The Hacker News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
IT之家
IT之家
Jina AI
Jina AI
Attack and Defense Labs
Attack and Defense Labs
S
SegmentFault 最新的问题
Simon Willison's Weblog
Simon Willison's Weblog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
Google Online Security Blog
Google Online Security Blog
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
罗磊的独立博客
L
LINUX DO - 最新话题
博客园 - Franky
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
The Last Watchdog
The Last Watchdog
J
Java Code Geeks
AI
AI
C
Cisco Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Cyber Attacks, Cyber Crime and Cyber Security
Cisco Talos Blog
Cisco Talos Blog
博客园 - 三生石上(FineUI控件)
雷峰网
雷峰网
Help Net Security
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
I
Intezer
S
Securelist

Hopefully Useful

macOS Needs Its Grid Back About Me Air Con: $1697 for an on/off switch The Future Called 30 Years Ago I Couldnt Wait for the New Mac Pro Ios App Promo Video on a Budget
Jekyll and Octopress
2013-07-21 · via Hopefully Useful

So I’ve decided I should probably blog about things in my life that other people might find interesting. I’ve decided this mainly because I’ve noticed that the longer I live in Japan the worse my English skills become. It could just be a case of getting older but I find myself often struggling for words or expressions that I’m sure used to come to me with ease. Since my Japanese is not getting proportionally better I should probably do something to stem the tide. Consider this, my umpteenth attempt at actually blogging that something.

Anyway I have decided to try out this Jekyll markdown based static blog generator. I subsequently chose Octopress because it came with a theme and bunch of instructions I actually found comprehensible.

The reason for using markdown is simple. I would like to keep any blog posts I actually do make readable as text files on my local computer. Although I know its syntax and general conventions, I’ve not actually used it for anything of note and this seems like a good first project.

Smoothish Sailing

Apparently Octopress needs a specific version of Ruby. 1.9.3 and the instructions on the website detailed how to get a program called rbenv to manage multiple versions. I’m completely ignorant to all things ruby so I must admit to being really surprised at this. Why isn’t simply the latest stable version the best choice?

Anyway after installing rbenv I tried to install the recommended version:

MacPro:~ christian$ rbenv install 1.9.3-p0

ERROR: This package must be compiled with GCC, but ruby-build couldn't
find a suitable `gcc` executable on your system. Please install GCC
and try again.

DETAILS: Apple no longer includes the official GCC compiler with Xcode
as of version 4.2. Instead, the `gcc` executable is a symlink to
`llvm-gcc`, a modified version of GCC which outputs LLVM bytecode.

For most programs the `llvm-gcc` compiler works fine. However,
versions of Ruby older than 1.9.3-p125 are incompatible with
`llvm-gcc`. To build older versions of Ruby you must have the official
GCC compiler installed on your system.

It then detailed how to download the latest version of GCC but I instead decided just to install what looked like the most recent version of 1.9.3

MacPro:~ christian$ rbenv install 1.9.3-p327
Downloading yaml-0.1.4.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/36c852831d02cf90508c29852361d01b
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /Users/christian/.rbenv/versions/1.9.3-p327
...success ensued

I thought I was home clear at this point but…

MacPro:Blog christian$ cd octopress/
MacPro:octopress christian$ ruby --version
rbenv: version `1.9.3-p194' is not installed
MacPro:octopress christian$ rbenv install 1.9.3-p194
Downloading yaml-0.1.4.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/36c852831d02cf90508c29852361d01b
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /Users/christian/.rbenv/versions/1.9.3-p194
...Success 2.0 ensued

Apparently the version is very specific. I’m sure all of this could have been avoided by anyone with a lick of ruby or yaml experience but I am a complete newbie with both.

Seems pretty good.

Teething problems aside, I quite like the workflow around this system. I edit a post inside the source/_posts directory with a name of YYYY-MM-DD-titleofpost.markdown and in a terminal I have simply entered the following:

MacPro:octopress christian$ rake preview
Starting to watch source with Jekyll and Compass. Starting Rack on port 4000
Configuration from /Users/christian/Dropbox/HUS/Projects/Blog/octopress/_config.yml
[2013-07-21 19:59:20] INFO  WEBrick 1.3.1
[2013-07-21 19:59:20] INFO  ruby 1.9.3 (2012-04-20) [x86_64-darwin12.4.0]
[2013-07-21 19:59:20] INFO  WEBrick::HTTPServer#start: pid=77031 port=4000
Auto-regenerating enabled: source -> public
[2013-07-21 19:59:20] regeneration: 94 files changed
>>> Compass is watching for changes. Press Ctrl-C to Stop.

Anytime I make a change this preview server notices it and regenerates. I’ve got plenty of my own hosting so I’ll most likely be following Octopress’ rsync deployment instructions. If this post is actually online then I guess it worked.