Closed melindahiggins2000 closed 8 years ago
PS. I'm running the RStudio preview version 0.99.1220
I cannot tell what the problem is from your description. You can execute this in R and see what the exact error message is:
system2("C:/PROGRA~1/R/R-33~1.0/bin/x64/Rscript", c("build.R", "_source/2014-09-28-jekyll-with-knitr.Rmd", "_posts/2014-09-28-jekyll-with-knitr.md"))
Thank you for your suggestion. Here are my results:
> system2("C:/PROGRA~1/R/R-33~1.0/bin/x64/Rscript", c("build.R", "_source/2014-09-28-jekyll-with-knitr.Rmd", "_posts/2014-09-28-jekyll-with-knitr.md"))
Quitting from lines 60-60 (_source/2014-09-28-jekyll-with-knitr.Rmd)
Error in eval(expr, envir, enclos) : object 'jekyll' not found
Calls: local ... capture.output -> evalVis -> withVisible -> eval -> eval
Execution halted
Warning message:
running command '"C:/PROGRA~1/R/R-33~1.0/bin/x64/Rscript" build.R _source/2014-09-28-jekyll-with-knitr.Rmd _posts/2014-09-28-jekyll-with-knitr.md' had status 1
I found the offending lines in the 2014-09-28-jekyll-with-knitr.Rmd
file - at row 60-61, the r code chunk
{r code=formatR::usage(jekyll), eval=FALSE}
throws an error stating that it cannot find the jekyll
object. I tried installing and loading the formatR
package and running it again. In the console typing the command formatR::usage(jekyll)
runs fine, but for some reason here in the code chunk it causes a compilation error.
Is there something I need to do to get the code=formatR::usage(jekyll)
r chunk option to work?
If I remove (comment out) this code chunk, everything works perfectly.
Thank you for your time and feedback.
Also if I move the code into the chunk block instead of in the header, the rmd
file compiles and the jekyll live update works fine. So, here is my edit
```{r eval=FALSE}
formatR::usage(jekyll)```
the above code chunk works fine, but this one with the code in the r chunk header does not
```{r code=formatR::usage(jekyll), eval=FALSE}```
Maybe I need an update to the knitr
package or perhaps be using the development version?
Thanks for providing the error message. I just fixed the Rmd source document in the knitr-jekyll repo. Instead of formatR::usage(jekyll)
, I should have used formatR::usage(servr::jekyll)
.
Great. Glad to help. Thank you again for the quick response. Wonderful package!
I cloned the https://github.com/yihui/knitr-jekyll site. From there, I tried editing one of the RMD files for the blog post while running servr::jekyll() to watch it update in real time. When I do, I get the following error:
After hitting STOP, I then get the next error message:
However, if I run
system("jekyll b)
to build the site and then runservr::jekyll()
the files have been created and I can see the updates from RMD blog file. But I cannot seem to get this to work in real time.Note: When running jekyll from a "Administrator Start Command Prompt with Ruby" (i.e. the Windows command window), I can run
jekyll s
, open a browser window athttp://127.0.0.1:4000/knitr-jekyll//
and then when I edit the MD files, I see real time updates to the website after refreshing the browser.My sessionInfo() is:
I'm sure this is a Windows specific issue - perhaps something having to do with path assignments. I am running the following version of Ruby, jekyll and these gems:
I also have a Gemfile located in this directory which references the
wdm
gem.Directory contents:
Gemfile
This edit is suggested at the Ruby documentation for listen, see http://www.rubydoc.info/gems/listen#On_Windows.
Thank you for your help. I'm hoping someone else may have run into this issue with Windows and maybe knows a workaround.
I really like the
servr
package even without the live updating feature working on Windows.