I’m having trouble with the Render button for Quarto Documents in RStudio. When I click Render, I get the following error in the Background Jobs tab (and the output is not created):
'C:/Program' is not recognized as an internal or external command, operable program or batch file.
I don’t fully understand what goes on in the background when I click Render. But from this error, I am guessing that RStudio is attempting to access a path in my Program Files directory, but it is not using quotations around the path (hence the failure at C:/Program).
A few other key pieces of information:
I have tried this with both HTML output and PDF output and have encountered the same issue. And for reference, I am trying this with a clean qmd file (with the same content that appears when you create a new Quarto Document in RStudio).
I am able to render the qmd file successfully using two other methods. I have successfully rendered the file by issuing commands in the Terminal tab of RStudio (quarto render "[file name].qmd"). I have also successfully rendered the file by running quarto::quarto_render in an R script.
I do not have the same problem with the Knit button for R Markdown. When I click Knit on an Rmd file, it successfully creates the output. And I can see in the Render tab of RStudio that quotations were used around file/folder paths:
I had the same error earlier today after updating to the most recent version of RStudio. No idea what the cause is, but I found that changing the file name to something else (e.g. hello.qmd) allowed me to render as usual. Maybe give that a try?
That worked! After removing spaces in the file name, I don't get the error.
Interesting. When I rendered via the command line, the spaces were fine, and (as expected, just like in R Markdown) the output replaced spaces with hyphens. But the Render button in RStudio seems to have issues with the spaces in the file name.
Thanks, @cderv! It looks like this is fixed in the latest version. I tested on daily build RStudio-2022.11.0-daily-130. I tested the same qmd file with and without spaces in the file name and was successfully able to render both versions by clicking the Render button in RStudio.
One question, though: This was the first time I've tested one of the daily builds. I installed it in a separate directory from my stable version of RStudio, and I uninstalled the daily build after completing the test. Can I proceed to use the stable version as normal now, or should I reinstall that?
If you did not uninstalled your stable version, I think it should be still here. Usually for daily builds on Windows, I am using the portable version (a zip file) so I don't have to uninstall the other version.
Anyway, if the stable version you have is still here and can still be opened, then it should be ok. If you can find it or opened it, just reinstall it. But I think everything is fine. Do you have any issue already ?
Yes, the stable version was still there and seems to be working fine so far. Good tip on the zipped version of the daily build. I'll do that next time.