Free eBook: Upgrading to Rails 4

21st October 2013 – 133 words

Andy Lindeman just open-sourced his book ‘Upgrading to Rails 4’ on Github.

alindeman/upgradingtorails4

To download and compile epub:

git clone https://github.com/alindeman/upgradingtorails4.git
cd upgradingtorails4
bundle install

bundle exec kitabu export
ls output/

Make also sure, to have pygments installed for syntax highlighting:

# ubuntu/debian
sudo apt-get install python-pygments

Additionally, to also generate pdfs, install Prince XML before running kitabu. Here the example for generic linux 32bit (All packages can be found on on their website)

# 32bit linux
cd /usr/local/src
sudo wget http://www.princexml.com/download/prince-9.0r2-linux-static.tar.gz
sudo tar xf prince-9.0r2-linux-static.tar.gz
cd prince-9.0r2-linux-static/
sudo bash install.sh

Now, epub html and txt files are in the output folder.