cboettig / labnotebook

:notebook: Source code and version history for my online lab notebook
http://www.carlboettiger.info
Creative Commons Zero v1.0 Universal
99 stars 61 forks source link

build.R error #124

Closed i2000s closed 8 years ago

i2000s commented 8 years ago

Hi Carl,

I tried to use the build.R script to automatically compile .Rmd files to .md Jekyll posts, but here is an error from bash:

$ Rscript build.R
Error in if (ext != "txt") c(base, ".txt") else c(base, "-out.", ext) : 
  missing value where TRUE/FALSE needed
Calls: local ... eval -> eval -> <Anonymous> -> basename -> auto_out_name
Execution halted

This error is due to the last line of the build.R code where knitr is called to evaluate paths and so on. I haven't figured out how to fix it. Do you have any insight?

I am using the latest knitr (devtools) and other packages on Ubuntu 16.04. Thanks!

cboettig commented 8 years ago

build.R is meant to be called by servr::jekyll, see http://yihui.name/knitr-jekyll/

Also I should note this repo is deprecated now -- current notebooks are split into separate repos as described here: http://www.carlboettiger.info/2015/01/01/notebook-maintenance-and-scaling.html

i2000s commented 8 years ago

Yeah, I have tried that

servr::jekyll(script=c("build.R"), command = '~/.rvm/gems/ruby-2.3.0/bin/jekyll build')

(or with makefile), but there is another issue I haven't solved with servr::jekyll(). Anyway, thank you.

cboettig commented 8 years ago

yeah, no idea about rvm problems, ruby versions have always been a mess to me. I strongly recommend trying with https://github.com/jekyll/docker.

i2000s commented 8 years ago

Thank you, Carl. Your experiences on the open labnotebook has been inspiring for me. I will look into docker later.