There are numerous online sources for learning Ember.js but the best one is their guide on official site. Recently I was learning this framework and headed to the guide page. I just wanted to read it first on my mobile or tablet, But the guide is neither mobile friendly nor any PDFs available. But they have full source of their website on github in Markdown.
I found few tutorials on how to converting Markdown to any other readable format like PDF. The tutorial at http://blog.alistairrobinson.com was quite simple and straight forward. I followed it bit by bit with some glitches. I will explain here the procedure along with solutions of problem I faced.
I'm using Ubuntu here. First Clone the source of Ember.js website source
Then I read full error message, It was like
I am also writing a script to automatically generate pdf for all the chapters in their respective folders. I will share it soon. Any suggestions are welcome.
I found few tutorials on how to converting Markdown to any other readable format like PDF. The tutorial at http://blog.alistairrobinson.com was quite simple and straight forward. I followed it bit by bit with some glitches. I will explain here the procedure along with solutions of problem I faced.
I'm using Ubuntu here. First Clone the source of Ember.js website source
$git clone https://github.com/emberjs/website.gitParallel to this install latest version of ruby and rubygems in separate
$sudo apt-get install ruby1.9.1 rubygemsNow try to install gimli, this gem will be used to convert .md files to .pdf
$sudo gem install gimlithis step will most probably will fail, as it failed to for me. I got following error message.
Failed to build gem native extension.I tried various solutions from these stackoverflow links http://stackoverflow.com/a/17657242/877492(Didn't work), http://stackoverflow.com/a/13767801/877492(didn't work)
Then I read full error message, It was like
.I went to the website mentioned in error message and ran following two commands in terminal, i guess the problem was with
.
$ sudo gem install gimli
Building native extensions. This could take a while...
ERROR: Error installing gimli:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for libxml/parser.h... no
-----
libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
.
.
.
$sudo apt-get install libxslt-dev libxml2-devThe gem installation will Work Now!!!Now go to any of the chapters in guide folder,
$sudo gem install nokogiri
$cd website/source/guides/routingCombine all the .md files in this folder to single routing_combined.md file
$cat index.md defining-your-routes.md generated-objects.md specifying-a-routes-model.md setting-up-a-controller.md rendering-a-template.md redirection.md sending-events-from-templates.md redirection.md specifying-the-location-api.md preventing-and-retrying-transitions.md > routing_combined.mdThen run below command and DONE! You will have your routing_combined.pdf file ready in the same folder.
$gimli -file routing_combined.md
I am also writing a script to automatically generate pdf for all the chapters in their respective folders. I will share it soon. Any suggestions are welcome.
No comments:
Post a Comment