alapo / Literate-Programming

This is the repository for the Literate Programming Workshop
39 stars 11 forks source link

LanguageToolR::lato_quick_setup() not working for me #6

Closed zahrapremji closed 3 years ago

zahrapremji commented 3 years ago

Describe the bug When I try to run the following line of code (line 34 in the InstallR script)

LanguageToolR::lato_quick_setup()

I get the following error:

Error in system2("java", c("-XshowSettings:properties", "-version"), stderr = TRUE,  : 
  '"java"' not found

To Reproduce Steps to reproduce the behavior: When I first tried installing the R packages, I forgot to install RTools and had gotten stuck on line 28 (Wordcountaddin) so I tried re-installing R and R studio and then figured out that I had missed RTools so did it in the right order. So this time I went line by line like in your video (after installing ALL of the other software) and I got through line 28 no problem. Everything worked OK until line 34 when I got this error.

Expected behavior I expected it to run like in your video.

Screenshots image

devtools::session_info() In your Console, type devtools::session_info() and paste it in the code section below. This allows me to evaluate your R environment for any issues.

```r setting value version R version 4.0.4 (2021-02-15) os Windows 10 x64 system x86_64, mingw32 ui RStudio language (EN) collate English_Canada.1252 ctype English_Canada.1252 tz America/Denver date 2021-03-17 - Packages ---------------------------------------------------------------------- package * version date lib source askpass 1.1 2019-01-13 [1] CRAN (R 4.0.4) assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.4) cachem 1.0.4 2021-02-13 [1] CRAN (R 4.0.4) callr 3.5.1 2020-10-13 [1] CRAN (R 4.0.4) cellranger 1.1.0 2016-07-27 [1] CRAN (R 4.0.4) cli 2.3.1 2021-02-23 [1] CRAN (R 4.0.4) crayon 1.4.1 2021-02-08 [1] CRAN (R 4.0.4) credentials 1.3.0 2020-07-21 [1] CRAN (R 4.0.4) curl 4.3 2019-12-02 [1] CRAN (R 4.0.4) data.table 1.14.0 2021-02-21 [1] CRAN (R 4.0.4) desc 1.3.0 2021-03-05 [1] CRAN (R 4.0.4) devtools 2.3.2 2020-09-18 [1] CRAN (R 4.0.4) easystats 0.3.0 2021-03-18 [1] Github (easystats/easystats@a56b091) ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.4) fansi 0.4.2 2021-01-15 [1] CRAN (R 4.0.4) fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.0.4) forcats 0.5.1 2021-01-27 [1] CRAN (R 4.0.4) foreign 0.8-81 2020-12-22 [2] CRAN (R 4.0.4) fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.4) glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.4) haven 2.3.1 2020-06-01 [1] CRAN (R 4.0.4) hms 1.0.0 2021-01-13 [1] CRAN (R 4.0.4) httr 1.4.2 2020-07-20 [1] CRAN (R 4.0.4) insight 0.13.1.1 2021-03-18 [1] Github (easystats/insight@e70a46a) jsonlite 1.7.2 2020-12-09 [1] CRAN (R 4.0.4) LanguageToolR 0.1.3 2021-03-18 [1] Github (nevrome/LanguageToolR@7a6ca3a) lifecycle 1.0.0 2021-02-15 [1] CRAN (R 4.0.4) magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.0.4) memoise 2.0.0 2021-01-26 [1] CRAN (R 4.0.4) openssl 1.4.3 2020-09-18 [1] CRAN (R 4.0.4) openxlsx 4.2.3 2020-10-27 [1] CRAN (R 4.0.4) pacman 0.5.1 2019-03-11 [1] CRAN (R 4.0.4) pillar 1.5.1 2021-03-05 [1] CRAN (R 4.0.4) pkgbuild 1.2.0 2020-12-15 [1] CRAN (R 4.0.4) pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.0.4) pkgload 1.2.0 2021-02-23 [1] CRAN (R 4.0.4) prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.0.4) processx 3.4.5 2020-11-30 [1] CRAN (R 4.0.4) ps 1.6.0 2021-02-28 [1] CRAN (R 4.0.4) purrr 0.3.4 2020-04-17 [1] CRAN (R 4.0.4) R6 2.5.0 2020-10-28 [1] CRAN (R 4.0.4) Rcpp 1.0.6 2021-01-15 [1] CRAN (R 4.0.4) readxl 1.3.1 2019-03-13 [1] CRAN (R 4.0.4) remotes 2.2.0 2020-07-21 [1] CRAN (R 4.0.4) rio 0.5.26 2021-03-01 [1] CRAN (R 4.0.4) rlang 0.4.10 2020-12-30 [1] CRAN (R 4.0.4) rprojroot 2.0.2 2020-11-15 [1] CRAN (R 4.0.4) rscodeio 0.1.0 2021-03-18 [1] Github (anthonynorth/rscodeio@88a1a37) rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.0.4) rvest 1.0.0 2021-03-09 [1] CRAN (R 4.0.4) sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.4) stringi 1.5.3 2020-09-09 [1] CRAN (R 4.0.3) sys 3.4 2020-07-23 [1] CRAN (R 4.0.4) testthat 3.0.2 2021-02-14 [1] CRAN (R 4.0.4) tibble 3.1.0 2021-02-25 [1] CRAN (R 4.0.4) usethis 2.0.1 2021-02-10 [1] CRAN (R 4.0.4) utf8 1.2.1 2021-03-12 [1] CRAN (R 4.0.4) vctrs 0.3.6 2020-12-17 [1] CRAN (R 4.0.4) withr 2.4.1 2021-01-26 [1] CRAN (R 4.0.4) xml2 1.3.2 2020-04-23 [1] CRAN (R 4.0.4) zip 2.1.1 2020-08-27 [1] CRAN (R 4.0.4) [1] C:/Users/zipre/Documents/R/win-library/4.0 [2] C:/Program Files/R/R-4.0.4/library ``` **Additional context** I tried to Google the problem first and came across responses to try installing 64-bit Java, which I did, but I still got the same error anyways.

alapo commented 3 years ago

GitHub Answers - Trouble installing Java

Great job posting your issue!!!

Colleague got this issue yesterday it stems from Java not being installed on your computer. Can you confirm that you installed Java from here?

https://java.com/en/download/manual.jsp

Make sure you download the 64-bit version.

If you installed the wrong version please do the following 1 - Uninstall Java 2 - Restart Computer 3 - reinstall Java (make sure RStudio is closed while doing this) 4 - Launch RStudio

Alternatively, run this line in your console

installr::install.java(version = 11, page_with_download_url = "http://jdk.java.net/java-se-ri/", path = "C:/java")

Keep me posted, if this fails I can hop on Zoom to help you troubleshoot sometime today. You can go ahead and run the rest of the lines in the install.R script and try running the manuscript.Rmd file, that package is not essential for what we will be doing in Module 04.

zahrapremji commented 3 years ago

Thank you. That worked. I had downloaded both the online and offline versions of Java and installed both, but I had RStudio open during all of the troubleshooting I did. I uninstalled, restarted, installed the offline version and now line 34 ran just fine. Thanks for the quick response.

alapo commented 3 years ago

Perfect!!

Yup you need to re-launch RStudio. When you open it, it looks on your computer for Java.

I'll go ahead and close the issue