Hopefully Useful

Hi I'm Christian Inkster, an independent developer that makes this and now this

Experimentation With Jekyll/Octopress

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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
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

1
2
3
4
5
6
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…

1
2
3
4
5
6
7
8
9
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:

1
2
3
4
5
6
7
8
9
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.