Rmarkdown error: no problem launching application from rstudio, error when accessing via web browser

I am developing an application on a linux R server that displays a report using rmarkdown.

1) When I run the application from Rstudio, the report displays and loads without issue.
2) When I access the application through a web browser, I get the error: "error in running command".

Note. The exact same files are used for 1 and 2. To be specific, the files used for 1 and 2 are not copies of the same files in different paths, the files used are in the same path.

The log reports the error as follows:

sh: / opt / shiny-server / ext / pandoc / pandoc: No such file or directory

System error (insert (shQuote (pandoc_path), "--version"), intern = TRUE):

error when running command

The code used to generate the rendering of the report is based on the Rstudio knitr example:

output$downloadReport <- downloadHandler(
    filename = 'scorecard.docx'
    ,

    content = function(file) {
      src <- normalizePath('/appl/shiny/ali/helpers/scorecard.Rmd')

      # temporarily switch to the temp dir, in case you do not have write
      # permission to the current working directory
      owd <- setwd(tempdir())
      on.exit(setwd(owd))
      file.copy(src, 'scorecard.Rmd')

      library(rmarkdown)
      out <- render('scorecard.Rmd', word_document())

      file.rename(out, file)
    }

      

I am running R version 3.1.2, Rstudio Version 0.99.442, rmarkdown 0.7, knitr_1.10.5, shiny_0.12.1

+3


source to share





All Articles