きょうのメモ: Gollum (Git-powered wiki)

※この記事は古いので、こちらをご覧ください。



gollum -- A wiki built on top of Git

A simple, Git-powered wiki with a sweet API and local frontend.

Features

  • Markdown, MediaWiki, Textileなど大抵の記法で書ける。
  • 基本的にgitリポジトリ一つで完結しており、MySQLなどのDBが不要で、簡単にprivate wikiを立ち上げられる。
  • セットアップが非常に楽。
  • gitで動いているので、バージョン管理や差分、コミットを遡ってrevertする、なんてこともWebのUIから簡単に操作できる。
  • 全文検索も実装されている。
  • ruby+sinatraで実装されているので、分かる人は拡張を簡単に書ける気がする。
  • シンタックスハイライトが効く
  • ファイルアップロード機能も一応ある(あんま重要視してない)
  • 管理がGit任せなので、操作に慣れていると楽
  • ほとんどそれだけしか機能が無いこと(ユーザ登録機能すら無いです)

Setup

$ mkdir mywiki
$ cd mywiki
$ git init
$ bundle init
(Gemfile) gem "gollum"
$ brew install icu4c
$ bundle install --path vendor/bundle
$ bundle exec gollum

Gollum on Heroku

Error

インストール時にエラー発生

***************************************************************************************
*********** icu required (brew install icu4c or apt-get install libicu-dev) ***********
***************************************************************************************
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

言われたとおり実行。Macなので:

$ brew install icu4c

(上記Setup手順には記載済み)

起動時にエラー発生

Gollum::InvalidGitRepositoryError

Gitリポジトリになってない。

$ git init

(上記Setup手順には記載済み)