Wrote a previous question related to rendering a quarto document with a .cmd file (quarto_render broken from .bat / .cmd file), but with the recent updates to RStudio, the pathing has changed as well as the commands needed for rendering a quarto doc as html, and I am once again stuck.
Much like before, this is a multi-step process, though I think I have a better understanding, thanks to the previous responses. For one thing, learned that the quarto render executable is from RStudio, not from R, which means updates to the RStudio IDE have a greater impact on the rendering process than R language updates.
RStudio version
(RStudio 2022.12.0+353 "Elsbeth Geranium" Release (..., 2022-12-03) for Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2022.12.0+353 Chrome/102.0.5005.167 Electron/19.1.3 Safari/537.36)
R Version (4.2.2)
File 1 - test_doc.qmd
- Create a new .qmd document (I called mine test_doc.qmd).
- Set to an output of html, and kept default YAML and other text. No modifications.
File 2 - test.cmd
After running the first two lines in the command prompt, and PAUSE the Error output is written below. This is a vexing error, since I've tried various iterations of the code below to account for this error, but then keep getting other error messages
{Command Prompt}
D:
D:\>"D:\Program Files\RStudio\resources\app\bin\quarto\bin\quarto.exe" render "C:\Users\%usernmae%\OneDrive - ...\Projects\Test\test_doc.qmd" PAUSE
ERROR: Error executing 'Rscript': program not found
Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
Results of Quarto Check in RStudio Terminal
[>] Checking Quarto installation......OK
Version: 1.2.269
Path: d:\Program Files\RStudio\resources\app\bin\quarto\bin
CodePage: 1252
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....(None)
Unable to locate an installed version of Python 3.
Install Python 3 from https://www.python.org/downloads/
[>] Checking R installation...........OK
Version: 4.2.2
Path: D:/Program Files/R/R-4.2.2
LibPaths:
- D:/Program Files/R/R-4.2.2/library
rmarkdown: 2.20
[>] Checking Knitr engine render......OK
Results of Quarto Check in Command Prompt
{Command Prompt}
D:\>"D:\Program Files\RStudio\resources\app\bin\quarto\bin\quarto.exe" check
[>] Checking Quarto installation......OK
Version: 1.2.269
Path: D:\Program Files\RStudio\resources\app\bin\quarto\bin
CodePage: 1252
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....(None)
Unable to locate an installed version of Python 3.
Install Python 3 from https://www.python.org/downloads/
[>] Checking R installation...........(None)
Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
Although, there is an install of 4.2.2 located in the D drive as well...
and quarto.exe --help
in RStudio Terminal
quarto.exe --help
Usage: quarto
Version: 1.2.269
Description:
Quarto CLI
Options:
-h, --help - Show this help.
-V, --version - Show the version number for this program.
Commands:
render [input] [args...] - Render files or projects to various document types.
preview [file] [args...] - Render and preview a document or website project.
serve [input] - Serve a Shiny interactive document.
create [type] [commands...] - Create a Quarto project or extension
create-project [dir] - Create a project for rendering multiple documents
convert <input> - Convert documents to alternate representations.
pandoc [args...] - Run the version of Pandoc embedded within Quarto.
run [script] [args...] - Run a TypeScript, R, Python, or Lua script.
add <extension> - Add an extension to this folder or project
install [target...] - Installs an extension or global dependency.
publish [provider] [path] - Publish a document or project. Available providers include:
check [target] - Verify correct functioning of Quarto installation.
help [command] - Show this help or the help of a sub-command.
Results in Command Prompt
{Command Prompt}
D:\>"D:\Program Files\RStudio\resources\app\bin\quarto\bin\quarto.exe" --help
Usage: quarto
Version: 1.2.269
Description:
Quarto CLI
Options:
-h, --help - Show this help.
-V, --version - Show the version number for this program.
Commands:
render [input] [args...] - Render files or projects to various document types.
preview [file] [args...] - Render and preview a document or website project.
serve [input] - Serve a Shiny interactive document.
create [type] [commands...] - Create a Quarto project or extension
create-project [dir] - Create a project for rendering multiple documents
convert <input> - Convert documents to alternate representations.
pandoc [args...] - Run the version of Pandoc embedded within Quarto.
run [script] [args...] - Run a TypeScript, R, Python, or Lua script.
add <extension> - Add an extension to this folder or project
install [target...] - Installs an extension or global dependency.
publish [provider] [path] - Publish a document or project. Available providers include:
check [target] - Verify correct functioning of Quarto installation.
help [command] - Show this help or the help of a sub-command.
Needless to say, any help with this would be greatly appreciated. Have tried variations on the theme above, but am really struggling with figuring this process out. Thank you for the assist!