blogdown::new_site() bash not found on win7

141 Views Asked by At

summary: bash not found on win7 (git bash is available)

blogdown::new_site(theme = "yihui/hugo-xmin")

Congratulations! Your new Hugo site is created in C:\Users\John\repos\openemr-blog3.

Just a few more steps and you're ready to go:

  1. Download a theme into the same-named folder. Choose a theme from https://themes.gohugo.io/, or create your own with the "hugo new theme " command.
  2. Perhaps you want to add some content. You can add single files with "hugo new \.".
  3. Start the built-in live server via "hugo server".

Visit https://gohugo.io/ for quickstart guide and full documentation. trying URL 'https://github.com/yihui/hugo-xmin/archive/master.zip' Content type 'application/zip' length 78899 bytes (77 KB) downloaded 77 KB

Rendering content/_index.Rmarkdown running: bash -c "cd ../..; find . -not -path '/exampleSite/' ( -name '.html' -o -name '.css' ) | xargs wc -l"

Quitting from lines 14-16 (_index.Rmarkdown) Error in system2(cmd, code, stdout = TRUE, stderr = TRUE, env = options$engine.env) : '"bash"' not found Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> Execution halted running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/Rscript" "C:/Users/John/Documents/R/win-library/3.4/blogdown/scripts/render_page.R" "_index.Rmarkdown" "C:/Users/John/repos/openemr-blog3/content"' had status 1Error in render_page(f) : Failed to render '_index.Rmarkdown' [1] TRUE /usr/bin/sed: can't read : No such file or directory Warning message: running command 'sed -i '' -e '1,6d' -e '34,38d' ../README.md' had status 2

devtools::session_info()

Session info ------------------------------------------

setting value
version R version 3.4.1 (2017-06-30) system x86_64, mingw32
ui RStudio (1.0.153)
language (EN)
collate English_United States.1252
tz America/New_York
date 2017-09-15

Packages -------------------------------------------

package * version date source
backports 1.1.0 2017-05-22 CRAN (R 3.4.0)
base * 3.4.1 2017-06-30 local
blogdown * 0.1.4 2017-09-15 Github (rstudio/blogdown@ec651e1) bookdown 0.5 2017-08-20 CRAN (R 3.4.1)
compiler 3.4.1 2017-06-30 local
datasets * 3.4.1 2017-06-30 local
devtools 1.13.3 2017-08-02 CRAN (R 3.4.1)
digest 0.6.12 2017-01-27 CRAN (R 3.4.0)
evaluate 0.10.1 2017-06-24 CRAN (R 3.4.1)
graphics * 3.4.1 2017-06-30 local
grDevices * 3.4.1 2017-06-30 local
htmltools 0.3.6 2017-04-28 CRAN (R 3.4.0)
knitr 1.17 2017-08-10 CRAN (R 3.4.1)
magrittr 1.5 2014-11-22 CRAN (R 3.4.0)
memoise 1.1.0 2017-04-21 CRAN (R 3.4.0)
methods * 3.4.1 2017-06-30 local
Rcpp 0.12.12 2017-07-15 CRAN (R 3.4.1)
rmarkdown 1.6 2017-06-15 CRAN (R 3.4.1)
rprojroot 1.2 2017-01-16 CRAN (R 3.4.0)
rstudioapi 0.7 2017-09-07 CRAN (R 3.4.1)
stats * 3.4.1 2017-06-30 local
stringi 1.1.5 2017-04-07 CRAN (R 3.4.0)
stringr 1.2.0 2017-02-18 CRAN (R 3.4.0)
tools 3.4.1 2017-06-30 local
utils * 3.4.1 2017-06-30 local
withr 2.0.0 2017-08-10 Github (jimhester/withr@190d293) yaml 2.1.14 2016-11-12 CRAN (R 3.4.0)

2

There are 2 best solutions below

0
On BEST ANSWER

The problem came from the example site provided by this theme. Specifically, the bash code chunk in content/_index.Rmarkdown (which is not useful to you as an end-user of the theme). Open this file in your website project, and delete the bash code chunk. Then you should be ready to go.

0
On

Its a windows issue (win7) with this particular theme. running new_site() with the default theme works fine.