내 경우는 아래 처럼 하면 됐다.
$ git clone https://github.com/progit/progit2-ko.git
$ cd progit2-ko
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby
$ source ~/.rvm/scripts/rvm
$ bundle install
$ asciidoctor-pdf-cjk-kai_gen_gothic-install
$ bundle exec rake book:build
rvm 받을 때 GPG 어쩌구 하면 이렇게 해준다.
$ command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
2018-02-01 추가:
현재 ubuntu 16.04, ruby2.3 환경에서 pdf 생성하려고 하면 아래와 같은 에러가 발생한다.
dhpark@boo:~/hacking/progit2-ko$ bundle exec asciidoctor-pdf -r asciidoctor-pdf-cjk-kai_gen_gothic -a pdf-style=KaiGenGothicKR progit.asc
/var/lib/gems/2.3.0/gems/prawn-templates-0.0.3/lib/prawn/templates.rb:246:in `<top (required)>': can't modify frozen Array (RuntimeError)
from /var/lib/gems/2.3.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:6:in `require'
from /var/lib/gems/2.3.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:6:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf.rb:3:in `require_relative'
from /var/lib/gems/2.3.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf.rb:3:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/asciidoctor-pdf-1.5.0.alpha.11/bin/asciidoctor-pdf:4:in `require'
from /var/lib/gems/2.3.0/gems/asciidoctor-pdf-1.5.0.alpha.11/bin/asciidoctor-pdf:4:in `<top (required)>'
from /usr/local/bin/asciidoctor-pdf:23:in `load'
from /usr/local/bin/asciidoctor-pdf:23:in `<main>'
dhpark@boo:~/hacking/progit2-ko$
참고 링크에서는 prawn 버전을 낮추면(2.2 -> 2.1) 해결된다고 되어있는데, gem repository에 2.1 버전이 없다. Orz.
ref: https://github.com/asciidoctor/asciidoctor-pdf/issues/782
happy hackin'