jimhester / knitrBootstrap

A framework to create bootstrap styled HTML reports from knitr Rmarkdown.
Other
274 stars 61 forks source link

Pandoc crashes rendering a knitrBootstrap document #64

Closed znmeb closed 10 years ago

znmeb commented 10 years ago

How to reproduce (on Fedora 20):


---
  output:
    knitrBootstrap::bootstrap_document:
    title: "Test file"
    theme: amelia
    highlight: sunburst
    theme.chooser: TRUE
    highlight.chooser: TRUE
---  
/usr/lib/rstudio/bin/pandoc/pandoc test.utf8.md --to html --from markdown-hard_line_breaks+superscript+tex_math_dollars+raw_html+markdown_in_html_blocks-implicit_figures --output test.html -H /tmp/RtmpKGorjc/knitr_bootstrap_full.html  
output file: test.knit.md
pandoc: Could not find data file templates/default.html
Error: pandoc document conversion failed with error 97
Execution halted
znmeb commented 10 years ago

Bingo - it's an RStudio problem! I renamed /usr/lib/rstudio/bin/pandoc and pressed 'knit' again. RStudio found Fedora's /usr/bin/pandoc and everything worked!

znmeb commented 10 years ago

Actually maybe it's rmarkdown's "render" that's broken - I'll look at the code after my hackathon this weekend.

bquast commented 10 years ago

any news on this, I have the same problem. Fedora 21 also

jimhester commented 10 years ago

I believe this might be an rmarkdown issue, could you post your sessionInfo(), Rstudio and pandoc version.

Thanks!

znmeb commented 10 years ago

If you're on Fedora 21

  1. Install the pandoc, pandoc-siteproc and pandoc-pdf packages with 'yum'
  2. Go into /usr/lib/rstudio/bin and rename pandoc to pandoc.bak. You'll need to be root to do this, of course.
  3. Try again - it should work.

As far as I'm concerned, this is an RStudio bug - their installer carries a bunch of things that aren't needed everywhere and messes up the dependency algorithms. I just found another such gotcha a few days ago - a Qt webkit library wasn't getting installed because RStudio "provided" it.

I have code in OSJourno (https://bitbucket.org/znmeb/osjourno/src/ec40bf07286db049f6c4d9b02de1bfde418c1ee0/1SetUpWorkstation/Maint/sudo-build-rstudio-packages.bash?at=master) to build RStudio from source and I'm probably going to switch over to doing that before my final release. That way, I can have both RStudio Desktop and Server and I can clean the unused junk out of the packages before I ship them.

bquast commented 10 years ago

RStudio: Version 0.98.1091 (though it first occurred on the previous version) rmarkdown: 0.3.1.0

sessionInfo()

R version 3.1.2 (2014-10-31)
Platform: x86_64-redhat-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] digest_0.6.4     htmltools_0.2.6  rmarkdown_0.3.10 tools_3.1.2      yaml_2.1.13